app/views/subjects/show.html.erb in enju_subject-0.1.1 vs app/views/subjects/show.html.erb in enju_subject-0.2.0.beta.1

- old
+ new

@@ -30,14 +30,14 @@ </div> </div> <div id="submenu" class="ui-corner-all ui-widget-content"> <ul> - <li><%= back_to_index(flash[:page_info]) -%></li> - <% if can? :update, @subject %> + <li><%= link_to t('page.back'), :back -%></li> + <% if policy(@subject).update? %> <li><%= link_to t('page.edit'), edit_subject_path(@subject) -%></li> <% end %> - <% if can? :delete, @subject %> + <% if policy(@subject).destroy? %> <li><%= link_to t('page.destroy'), subject_path(@subject), data: {confirm: t('page.are_you_sure')}, method: :delete -%></li> <% end %> </ul> </div>