Let’s say I have a catalog with hotels. Each hotel belongs to a
category (4-star, 5-star etc.) This is it’s official category.However,
there is also a category that users assign and a category that
“independent reviewers” assign. So I have this:
class Hotel < ActiveRecord::Base
belongs_to :hotel_class # this is fine and ok
can I also something like this, however?
:foreign_key => ‘reviewer_category’
:foreign_key => ‘user_category’
I would really really really hate to do something like
HotelCategory.find(:first, :conditions => …) for every hotel
request. I want ORM
What’s the approach to such a situation?