-
-
Save waseem/1538640 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Company < ActiveRecord::Base | |
###company validation | |
validates_presence_of :company_name, :message => "Company Name is required!", :unless => :user_name_present? | |
def user_name_present? | |
self.user_name.present? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment