It would appear that using :include on a model that has_many with an
:order on another model makes it so that the order is ignored. Is this
supposed to happen? Strikes me as odd behavior.
For example
class Farmer < ActiveRecord::Base
has_many :cows, :order => ‘position’
end
class Cow < ActiveRecord::Base
acts_as_list :scope => :farmer
end
If I do Farmer.find(:first).cows I get the correct cow order.
If I do Farmer.find(:first, :include => ‘cows’) then I get the wrong
cow order.
Any insight into if this is a bug or intended behavior would be great.
Matthew M.
blog.mattmargolis.net