Created
July 3, 2012 17:15
-
-
Save scottmagdalein/3041122 to your computer and use it in GitHub Desktop.
numericality
This file contains 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 Applicant < ActiveRecord::Base | |
attr_accessible :avatar_url, :email, :facebook_url, :google_plus_url, :linkedin_url, :name, :phone, :phys_address, :position_id, :phase_id, :resume_url, :search_url, :twitter_url, :website_url | |
validates :name, :presence => true | |
validates :phone, :presence => true | |
validates :email, :presence => true | |
validates :phys_address, :presence => true | |
validates_numericality_of :position_id :on => :create | |
validates_numericality_of :phase_id :on => :create | |
has_many :comments | |
has_many :likes | |
belongs_to :position | |
belongs_to :phase | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment