Sha256: a167ffd21032a0381164ef29720e811d734df57d0b5251039ad905fa905b3149
Contents?: true
Size: 902 Bytes
Versions: 4
Compression:
Stored size: 902 Bytes
Contents
- resource = (@_effective_resource || Effective::Resource.new(controller_path)) - @resource = instance_variable_get('@' + resource.name) if resource.name - if @resource .row .col-xs-8 %h1= @page_title .col-xs-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 'form', resource.name.to_sym => @resource
Version data entries
4 entries across 4 versions & 1 rubygems