Sha256: 869113306340b0d94416d9fff423555fc08d03d1d0281b54f5c35fb74f31da14
Contents?: true
Size: 1.01 KB
Versions: 20
Compression:
Stored size: 1.01 KB
Contents
- resource = (@_effective_resource || Effective::Resource.new(controller_path)) - @resource = instance_variable_get('@' + resource.name) if resource.name - if @resource .row .col-sm-6 %h1= @page_title .col-sm-6 %p.text-right - resource.member_post_actions.each do |action| - if EffectiveResources.authorized?(controller, action.to_sym, @resource) - if resource.action_post_path(action, check: true).present? = link_to action.titleize, send(resource.action_post_path(action), @resource), class: 'btn btn-primary', data: { confirm: "Really #{action} #{@resource}?", method: :post } - if EffectiveResources.authorized?(controller, :destroy, @resource) - if resource.destroy_path(check: true).present? = link_to 'Delete', send(resource.destroy_path, @resource), class: 'btn btn-danger', data: { confirm: "Really delete #{@resource}?", method: :delete } = render 'form', resource.name.to_sym => @resource
Version data entries
20 entries across 20 versions & 1 rubygems