search for: main_entity

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

2006 Jun 11
0
Reaching through a belongs_to for acts_as_list scope?
...de the list scope for an acts_as_list model from one step removed. In minimalistic form (with several other associations removed from each level). class MainEntity < AcrtiveRecord::Base has_many :containers end class Container < ActiveRecord::Base has_many :elements belongs_to :main_entity end class Elements < ActiveRecord::Base belong_to :containers acts_as_list :scope=> ??? # it wants to be container.main_entity_id end Now I''ve thought of two ways to solve this. 1. add main_entity_id to the Element -- this adds a redundant link in the DB, and I'...