Sha256: 77177226f47451c613171ec2c8fd82f58ed9498c91b32af9d0f4677145885c3c

Contents?: true

Size: 611 Bytes

Versions: 7

Compression:

Stored size: 611 Bytes

Contents

%p= link_to 'Back', root_path

%h1 Listing of #{@pages.count} pages

%table
  %tr
    %th Num
    %th User
    %th Title
    %th State
    %th
    %th
    %th

  - @pages.each_with_index do |page, index|
    %tr
      %td
        - if current_user and current_user.owner?(page)
          %span{ style: "color:red" }= index.next
        - else
          = index.next
      %td= page.user_id
      %td= page.title
      %td= page.state
      %td= link_to 'Show', page
      %td= link_to 'Edit', edit_page_path(page)
      %td= link_to 'Destroy', page, :data => { :confirm => 'Are you sure?' }, :method => :delete

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
the_role-2.5.4 spec/dummy_app/app/views/pages/index.html.haml
the_role-2.5.3 spec/dummy_app/app/views/pages/index.html.haml
the_role-2.5.2 spec/dummy_app/app/views/pages/index.html.haml
the_role-2.5.1 spec/dummy_app/app/views/pages/index.html.haml
the_role-2.5 spec/dummy_app/app/views/pages/index.html.haml
the_role-2.4 spec/dummy_app/app/views/pages/index.html.haml
the_role-2.3 spec/dummy_app/app/views/pages/index.html.haml