Guest User

Untitled

a guest
Jul 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. %table.list
  2. %thead
  3. %tr
  4. - sort_headers_for :section, %w{name created_at updated_at operations} do |header|
  5. - "Last Changed" if header == 'updated_at'
  6.  
  7. - oddity = 1
  8. - @sections.each do |section|
  9. %tr{ :class => ( oddity %2 == 0 )? '' : 'odd' }
  10. - oddity = oddity + 1
  11.  
  12. %td= link_to section.name, section_path(section)
  13. %td= section.created_at.strftime("%B, %d %Y")
  14. %td= section.updated_at.strftime("%B, %d %Y")
  15. %td
  16. = link_to 'Edit', edit_section_path(section)
  17. = link_to 'Destroy', section, :confirm => 'Are you sure?', :method => :delete
  18.  
  19. = will_paginate @sections
Add Comment
Please, Sign In to add comment