Ruby on Rails
Thursday, January 24, 2013
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 <webagent...@googlemail.--com > 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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment