Sha256: 73b71e58b17fc884b3d020bbe67cd217af6cb1433d3ed0c44bace50a9dc85a01
Contents?: true
Size: 1.63 KB
Versions: 4
Compression:
Stored size: 1.63 KB
Contents
= dropdown(variation: :dropleft) do - if actions.index(:edit) - if EffectiveResources.authorized?(controller, :edit, resource) = dropdown_link_to 'Edit', effective_resource.action_path(:edit, resource), title: "Edit #{resource}" - if actions.index(:show) - if EffectiveResources.authorized?(controller, :show, resource) = dropdown_link_to 'View', effective_resource.action_path(:show, resource), title: resource.to_s - (actions - effective_resource.crud_actions).each do |action| - if effective_resource.member_post_actions.include?(action) - if EffectiveResources.authorized?(controller, action, resource) = dropdown_link_to action.to_s.titleize, effective_resource.action_path(action, resource), title: "#{action} #{resource}", data: { method: :post, confirm: "#{action.to_s.titleize} #{resource}?"} - elsif effective_resource.member_get_actions.include?(action) - if EffectiveResources.authorized?(controller, action, resource) = dropdown_link_to action.to_s.titleize, effective_resource.action_path(action, resource), title: "#{action.to_s.titleize} #{resource}" - else - if EffectiveResources.authorized?(controller, action, effective_resource.klass) = dropdown_link_to action.to_s.titleize, effective_resource.action_path(action), title: action.to_s.titleize = yield if block_given? - if actions.index(:destroy) - if EffectiveResources.authorized?(controller, :destroy, resource) = dropdown_link_to 'Delete', effective_resource.action_path(:destroy, resource), title: "Delete #{resource}", data: { method: :delete, confirm: "Delete #{resource}?" }
Version data entries
4 entries across 4 versions & 1 rubygems