Sha256: 0296013217b9ef24e21442080003b037d4a63bbdc164fdc174b1e41d8674187e
Contents?: true
Size: 973 Bytes
Versions: 30
Compression:
Stored size: 973 Bytes
Contents
- resource = (@_effective_resource || Effective::Resource.new(controller_path)) - @resource = instance_variable_get('@' + resource.name) if resource.name - if @resource .row .col-8 %h1= @page_title .col-4.text-right - resource.member_post_actions.each do |action| - if EffectiveResources.authorized?(controller, action, @resource) && (path = resource.action_path(action, @resource)).present? = link_to action.to_s.titleize, path, class: 'btn btn-sm btn-primary', data: { confirm: "Really #{action} #{@resource}?", method: :post } - if EffectiveResources.authorized?(controller, :destroy, @resource) && (path = resource.action_path(:destroy, @resource)).present? = link_to 'Delete', path, class: 'btn btn-sm btn-danger', data: { confirm: "Really delete #{@resource}?", method: :delete } = render @resource .form-actions = link_to 'Continue', (resource.action_path(:index) || root_path), class: 'btn btn-primary'
Version data entries
30 entries across 30 versions & 1 rubygems