LOL thanks guys! it works now :D

Now that I see it working I understand it better.

Here's the code...

<% @appointments.group_by { |appointment| appointment.start.strftime("%A 
%b %d") }.each_pair do |start_date, appointments| %>
  <tr><th colspan="6" class="appointments_table_row_date"><%= start_date 
%></th></tr>
  <% appointments.each do |appointment| %>
    <tr class="<%= cycle('list_line_odd', 'list_line_even') %>">
      <td><%= appointment.client.name %></td>
      <td><%= appointment.service.name %></td>
      <td><%= appointment.start.strftime("%I:%M %p") %></td>
      <td><%= link_to 'Show', appointment %></td>
      <td><%= link_to 'Edit', edit_appointment_path(appointment) %></td>
      <td><%= link_to 'Destroy', appointment, :confirm => 'Are you 
sure?', :method => :delete %></td>
    </tr>
  <% end %>
<% end %>

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