Module: Effective::CrudController
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/effective/crud_controller.rb,
app/controllers/concerns/effective/crud_controller/dsl.rb,
app/controllers/concerns/effective/crud_controller/save.rb,
app/controllers/concerns/effective/crud_controller/paths.rb,
app/controllers/concerns/effective/crud_controller/actions.rb,
app/controllers/concerns/effective/crud_controller/respond.rb,
app/controllers/concerns/effective/crud_controller/submits.rb,
app/controllers/concerns/effective/crud_controller/permitted_params.rb
Defined Under Namespace
Modules: Actions, ClassMethods, Dsl, Paths, PermittedParams, Respond, Save, Submits
Constant Summary
Constants included from PermittedParams
Instance Method Summary collapse
- #effective_resource ⇒ Object
- #resource ⇒ Object
- #resource=(instance) ⇒ Object
- #resources ⇒ Object
- #resources=(instance) ⇒ Object
Methods included from Save
#commit_action, #duplicate_resource, #reload_resource, #resource_flash, #save_resource
Methods included from Respond
#respond_with_error, #respond_with_success
Methods included from PermittedParams
#resource_active_model_permitted_params, #resource_permitted_params
Methods included from Paths
#referer_redirect_path, #resource_action_path, #resource_destroy_path, #resource_duplicate_path, #resource_edit_path, #resource_index_path, #resource_new_path, #resource_redirect_path, #resource_show_path, #specific_redirect_path?
Methods included from Actions
#collection_action, #create, #destroy, #edit, #index, #member_action, #new, #show, #update
Instance Method Details
#effective_resource ⇒ Object
64 65 66 |
# File 'app/controllers/concerns/effective/crud_controller.rb', line 64 def effective_resource self.class.effective_resource end |
#resource ⇒ Object
48 49 50 |
# File 'app/controllers/concerns/effective/crud_controller.rb', line 48 def resource # @thing instance_variable_get("@#{resource_name}") end |
#resource=(instance) ⇒ Object
52 53 54 |
# File 'app/controllers/concerns/effective/crud_controller.rb', line 52 def resource=(instance) instance_variable_set("@#{resource_name}", instance) end |
#resources ⇒ Object
56 57 58 |
# File 'app/controllers/concerns/effective/crud_controller.rb', line 56 def resources # @things send(:instance_variable_get, "@#{resource_plural_name}") end |
#resources=(instance) ⇒ Object
60 61 62 |
# File 'app/controllers/concerns/effective/crud_controller.rb', line 60 def resources=(instance) send(:instance_variable_set, "@#{resource_plural_name}", instance) end |