Displaying 1 result from an estimated 1 matches for "vincey".
Did you mean:
vince
2008 Jan 21
13
has_many with different primary key
I''ve got quite the ActiveRecord challenge, any help would be
appreciated.
In my current project Companies can have many reviews.
class Company < ActiveRecord::Base
has_many :reviews, :as => :reviewable
end
However, my company table, I have two different IDs to identify my
company.
id - This is the typical id we use for normal stuff
other_company_id - This is the id we use