Module: Effective::CrudController::ClassMethods
- Defined in:
- app/controllers/concerns/effective/crud_controller.rb
Instance Method Summary collapse
-
#member_action(action) ⇒ Object
Add the following to your controller for a simple member action member_action :print.
Instance Method Details
#member_action(action) ⇒ Object
Add the following to your controller for a simple member action member_action :print
11 12 13 14 15 16 17 18 |
# File 'app/controllers/concerns/effective/crud_controller.rb', line 11 def member_action(action) define_method(action) do self.resource ||= resource_class.find(params[:id]) @page_title ||= resource.to_s EffectiveResources.(self, action, resource) end end |