Conrad Taylor wrote:
> On Thu, Nov 12, 2009 at 5:58 PM, Tony Tony 
> <[email protected]
>> wrote:
> 
>>  <h2><%= month.strftime('%B') %></h2>
>>
>>
>>
>> Many thanks!
>> -Tony
>>
> 
> Tony, you should be able to do something like this:
> 
> <% for task in tasks %>
> 
>    ...
> 
>    <% tag :hr unless task == tasks.last %>
> <% end %>

Better:

<% tasks.collect do |task| %>
  HTML markup
<% end.join tag(:hr) %>

(some % may need to be %=)

Better still: refactor the whole thing into partials and/or helpers.

 Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
> 
> Good luck,
> 
> -Conrad

-- 
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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to