search for: hotel_class

Displaying 1 result from an estimated 1 matches for "hotel_class".

2006 Jun 29
4
Multiple belongs_to
...official category.However, there is also a category that users assign and a category that "independent reviewers" assign. So I have this: hotels { id, category_id, reviewer_category, user_category } categories { id, name } class Hotel < ActiveRecord::Base belongs_to :hotel_class # this is fine and ok # can I also something like this, however? belongs_to :hotel_class, :foreign_key => ''reviewer_category'' belongs_to :hotel_class, :foreign_key => ''user_category'' end I would really rea...