-
-
Save wprater/93e5858417bb14ec18c9 to your computer and use it in GitHub Desktop.
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 Consultant < ActiveRecord::Base | |
has_one :recruiter, :class_name => "Contact", :foreign_key => "recruiter_contact_id" | |
has_one :client | |
has_many :consultants_projects | |
# We want all the fields on the consultants_projects association | |
has_many :projects, | |
:through => :consultants_projects, | |
:select => 'consultants_projects.*, projects.*' | |
validates_presence_of :first_name, :on => :create, :message => "can't be blank" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment