[Rails] Re: Order for a each loop

2009-06-30 Thread Colin Law
2009/6/29 Rob Biedenharn r...@agileconsultingllc.com: On Jun 29, 2009, at 5:31 PM, Shandy Nantz wrote: I have a model for users and another model for linenumbers and I have some code that looks like: @user.linenumbers.each do |line| end and it loops through a user and their line

[Rails] Re: Order for a each loop

2009-06-30 Thread Shandy Nantz
Perfect, exactly what I wanted, thank you both. -S -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ 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

[Rails] Re: Order for a each loop

2009-06-29 Thread Frederick Cheung
On Jun 29, 5:31 pm, Shandy Nantz rails-mailing-l...@andreas-s.net wrote: I have a model for users and another model for linenumbers and I have some code that looks like: @user.linenumbers.each do |line| end and it loops through a user and their line numbers. What if I want to order

[Rails] Re: Order for a each loop

2009-06-29 Thread Rob Biedenharn
On Jun 29, 2009, at 5:31 PM, Shandy Nantz wrote: I have a model for users and another model for linenumbers and I have some code that looks like: @user.linenumbers.each do |line| end and it loops through a user and their line numbers. What if I want to order this list, is there a way to