Displaying 1 result from an estimated 1 matches for "dishtag".
Did you mean:
dish_tag
2010 Feb 14
2
has_many :through eager loading only loading one record
...has_many :through and eager
loading, but this one has me stumped.
The problem is that Active Record is only eager-loading the first of
many records. Here are the models (note set_table_name for a legacy
schema):
class Tag < ActiveRecord::Base
set_table_name ''tag''
end
class DishTag < Tag
has_many :dish_taggings, :foreign_key => ''tag_id''
has_many :dishes, :through => :dish_taggings
end
class DishTagging < ActiveRecord::Base
set_table_name ''dish_tag''
belongs_to :dish
belongs_to :dish_tag, :foreign_key => ''tag_id&...