Bryan,

I've tried that as well with no luck. I want to sort based on a value
derived from the has_many association of the model. So, I've reverted
to a "roll my own" table. Not as fancy, but I guess it will have to
do....

Johannes

On Mar 4, 11:34 am, Bryan Larsen <[email protected]> wrote:
> On Mar 4, 10:29 am, Johannes Vanderknyff
>
> <[email protected]> wrote:
> > Bryan,
>
> > Thank you. That makes sense, I was wondering why an array of models
> > converted to another array of models wouldn't work.  I did figure out that
> > any "find" statement would work. However, what I need to do is create a
> > subset of my model and then sort it and I can't seem to figure out how to
> > keep that "association"
>
> You can use named_scope or (find :conditions) to get your subset.
>
> For ordering, you can use the :order option on your has_many.  Note
> that you can have more than one has_many that are essentially the same
> except for :order.
>
> has_many :comments, :order => :created_at
> has_many :comments_by_auther, :order => :auther, :class_name =>
> "Comment"
>
> Bryan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to