2009/11/13 Tony Tony <[email protected]>: > > Conrad Taylor wrote: >> On Thu, Nov 12, 2009 at 7:20 PM, Conrad Taylor <[email protected]> >> wrote: >> >>>> The code is this... >>>> <hr/> <!-- THIS IS WHAT I NEED TO NOT DISPLAY ON TH LAST RECORD --> >>>> >>> <% for task in tasks %> >>> >>> ... >>> >>> <% tag :hr unless task == tasks.last %> >>> >> >> The above should be >> >> <%= tag :hr unless task == tasks.last %> >> >> -Conrad > > > Thanks for the reply guys... I've tried doing all of the suggestions but > it still doesn't work. I suspect it may be something to do with the sort > call? > > <% @task_months.sort.each do |month, tasks| %> > > By the way - The issue is with the each loop, not the for loop. >
Have a look at the rails guide on Debugging and then break in to the loop and work out what is going on. (use ruby-debug). You can inspect each variable and see what is not as you expect. Colin --~--~---------~--~----~------------~-------~--~----~ 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] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

