%h1 Listing profiles %p - if policy(Profile).new? = link_to '+ New Profile', new_profile_path - else = link_to 'Sign In', new_user_session_path to create a new Profile %table %thead %tr -# %th User %th Name %th Summary %th About -# - if policy(Profile).destroy? -# %th -# %th %tbody - @profiles.each do |profile| %tr -# %td= profile.user %td= link_to profile.name, profile %td= profile.summary %td= profile.about -# - if policy(profile).destroy? -# %td= link_to 'Edit', edit_profile_path(profile) -# %td= link_to 'Destroy', profile, method: :delete, data: { confirm: 'Are you sure?' }