Displaying 1 result from an estimated 1 matches for "acrtiverecord".
Did you mean:
  acriverecord
  
2006 Jun 11
0
Reaching through a belongs_to for acts_as_list scope?
I''m running into a situation where I''d like to provide 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...