Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Name < ActiveRecord::Base
- belongs_to :person
- belongs_to :prefix, :class_name => "LookupCode", :readonly => true
- belongs_to :suffix, :class_name => "LookupCode", :readonly => true
- validate :validate_lookup_codes
- validates_presence_of :person_id, :message => "must be assigned."
- validates_presence_of :last_name, :message => "can't be blank"
- validates_length_of :first_name, :middle_name, :last_name, :maximum => 100, :allow_blank => true
- validates_length_of :aliases, :maximum => 250, :allow_blank => true
- ##
- class Person < ActiveRecord::Base
- has_many :names
- has_many :identifiers, :as => :identifiable
- before_validation :check_external_id
- validates_length_of :job_title, :employer_name, :maximum => 100, :allow_blank => true
Add Comment
Please, Sign In to add comment