Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %h1 Listing pages
- %table
- %tr
- %th ID
- %th Name
- %th Page Name
- %th Title
- %th Parent
- %th Page Type
- %th{:colspan => 3} Actions
- - Page.all.each do |page|
- %tr
- %td= h page.id
- %td= h page.name
- %td= h page.page_name
- %td= h page.title
- %td= h page.parent.nil? ? "n/a" : page.parent.page_name
- %td= h PageType[page.page_type].display
- %td{:class => :actions}
- = link_to 'Show', page
- |
- = link_to 'Edit', edit_page_path(page)
- |
- = link_to 'Destroy', page, :confirm => 'Are you sure?', :method => :delete
- %br
- = link_to 'New page', new_page_path
Add Comment
Please, Sign In to add comment