%h1 Posts index .buttons = link_to("New post", new_post_path) if admin_account_can?(:create, Post) %table %th %td View %td Edit %td Delete - posts.each do |post| %tr %td = link_to(post.title, post_path(post)) if admin_account_can?(:read, post) %td = link_to("Edit", edit_post_path(post)) if admin_account_can?(:edit, post) %td = link_to("Delete", post_path(post), :method => 'delete') if admin_account_can?(:delete, post)