Class: Effective::SubscripterController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Effective::SubscripterController
- Includes:
- CrudController
- Defined in:
- app/controllers/effective/subscripter_controller.rb
Instance Method Summary collapse
- #resource ⇒ Object
-
#save_resource(resource, action, to_assign) ⇒ Object
I don't want save_resource to wrap my save in a transaction.
-
#subscripter_params ⇒ Object
StrongParameters.
Instance Method Details
#resource ⇒ Object
9 10 11 |
# File 'app/controllers/effective/subscripter_controller.rb', line 9 def resource @subscripter ||= Effective::Subscripter.new(user: current_user) end |
#save_resource(resource, action, to_assign) ⇒ Object
I don't want save_resource to wrap my save in a transaction
14 15 16 17 |
# File 'app/controllers/effective/subscripter_controller.rb', line 14 def save_resource(resource, action, to_assign) resource.assign_attributes(to_assign) resource.save! end |
#subscripter_params ⇒ Object
StrongParameters
20 21 22 |
# File 'app/controllers/effective/subscripter_controller.rb', line 20 def subscripter_params params.require(:effective_subscripter).permit! end |