%h1 Listing subscriptions %table#subscriptions_list %thead %tr %th Subs type %th Start date %th End date %th Subs years -if can? :maintain,Subscription %th Reminder sent %th Welcome letter sent %th Amount paid %th %th %th %tbody - @user.subscriptions.each do |subscription| %tr %td= subscription.subs_type %td= subscription.start_date %td= subscription.end_date %td= subscription.subs_years -if can? :maintain,Subscription %td= subscription.reminder_sent %td= subscription.welcome_letter_sent %td= subscription.amount_paid %td= link_to 'Show', [@user,subscription] %td= link_to 'Edit', edit_user_subscription_path(@user,subscription) %td= link_to 'Destroy', [@user,subscription], :method => :delete, :data => { :confirm => 'Are you sure?' }