I was wondering if it’s possible to some how control the :order given
on a has_many depending on another attribute?
Or do I need to just create multiple has_many relationships pointing
to the same table but with different orders and then select which one
I use in the controller instead?
class Category < AR::B
has_many :products, :order => //something magical?//
class Category < AR:B
has_many :products, :order => “product_id”
has_many :products_by_desc, :class_name => “Product”, :order =>
has_many :products_by_gtin, :class_name => “Product”, :order => “gtin”
If I had a column that was default_order on the Category, could it
evaluate it and set the :order at the model level, or do I go in and
get my record set and hardcode which relationship matches which value
of the column?