app/views/itsf/backend/resource/base/index.html.haml in itsf_backend-1.1.8 vs app/views/itsf/backend/resource/base/index.html.haml in itsf_backend-1.1.9

- old
+ new

@@ -5,13 +5,15 @@ = t('.title', inflections) %span.label.label-default= Itsf::Backend.features?(:kaminari) ? "#{@collection.total_count}/#{resource_class.count}" : @collection.count .col-xs-4 #page-actions.btn-container-right .btn-group - - if !Itsf::Backend.features?(:pundit) || policy(resource_class).new? - = link_to new_resource_path, id: "link-to-#{controller.class.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-new", class: 'btn btn-success btn-responsive' do - %span.glyphicon.glyphicon-plus - %span.btn-text= t('.new', inflections) + - begin + - if !Itsf::Backend.features?(:pundit) || policy(resource_class).new? + = link_to new_resource_path, id: "link-to-#{controller.class.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-new", class: 'btn btn-success btn-responsive' do + %span.glyphicon.glyphicon-plus + %span.btn-text= t('.new', inflections) + - rescue ActionController::UrlGenerationError .panel.panel-default.panel-with-actions - if Itsf::Backend.features?(:kaminari) .panel-heading .pull-right.form-inline \ No newline at end of file