Module: SolidusAdmin::AdminResources
- Defined in:
- lib/solidus_admin/admin_resources.rb
Instance Method Summary collapse
Instance Method Details
#admin_resources(resource, **options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/solidus_admin/admin_resources.rb', line 4 def admin_resources(resource, **) batch_actions = %i[destroy] batch_actions &= [:only] if [:only] batch_actions -= [:except] if [:except] resources(resource, ) do yield if block_given? collection do delete :destroy if batch_actions.include?(:destroy) end member do patch :move if [:sortable] end yield if block_given? end end |