Ordering the results from :through

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?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs