Think, you mean something like:

Model.sort_by{|h| [h.user_id, -h.week_id]}
?





Am Donnerstag, 24. Januar 2013 10:24:57 UTC+1 schrieb Jordon Bedwell:
>
> On Thu, Jan 24, 2013 at 3:14 AM, Werner 
> <[email protected]<javascript:>> 
> wrote: 
> > Feel a litte ittle stupid right now.. 
> > where to sort_by? 
>
> Well, without a coherent though (AKA proper data outputs in the form 
> of say a copy of the pry session where it outputs => { } and then you 
> go through the steps I cannot say.  I have no idea about your code and 
> your examples are pretty broad as to the data you are working with. 
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/HGSgcRR7QmUJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to