I have a join table with a sequence number in it. I have specified a
"has_many :through" on my model using the join table. I would like to
get the results of using the :through relationship ordered by the
sequence number. For example,
Table One
has_many :joins, :order => "seqno"
has_many :twos, :through => :joins
Table Join
belongs_to :one
acts_as_list :scope => "one_id", :column =>
"seqno"
belongs_to :two
Table Two
has_many :joins
has_many :ones, :through => :joins
So, I would like to say "one.twos"
one = One.find(:first)
... one.twos ...
and have the twos sorted by seqno. Anyone know if this is possible?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---