Skip to content

Instantly share code, notes, and snippets.

@waseem
Forked from anonymous/_signup_form.html.erb
Created December 30, 2011 08:14
Show Gist options
  • Save waseem/1538640 to your computer and use it in GitHub Desktop.
Save waseem/1538640 to your computer and use it in GitHub Desktop.
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