Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %table.list
- %thead
- %tr
- - sort_headers_for :section, %w{name created_at updated_at operations} do |header|
- - "Last Changed" if header == 'updated_at'
- - oddity = 1
- - @sections.each do |section|
- %tr{ :class => ( oddity %2 == 0 )? '' : 'odd' }
- - oddity = oddity + 1
- %td= link_to section.name, section_path(section)
- %td= section.created_at.strftime("%B, %d %Y")
- %td= section.updated_at.strftime("%B, %d %Y")
- %td
- = link_to 'Edit', edit_section_path(section)
- = link_to 'Destroy', section, :confirm => 'Are you sure?', :method => :delete
- = will_paginate @sections
Add Comment
Please, Sign In to add comment