Module: Brightcontent::StrongParamsFix
- Included in:
- BaseController
- Defined in:
- lib/brightcontent/strong_params_fix.rb
Instance Method Summary collapse
Instance Method Details
#build_resource ⇒ Object
4 5 6 |
# File 'lib/brightcontent/strong_params_fix.rb', line 4 def build_resource get_resource_ivar || set_resource_ivar(end_of_association_chain.send(method_for_build, params_for_build)) end |
#params_for_build ⇒ Object
8 9 10 |
# File 'lib/brightcontent/strong_params_fix.rb', line 8 def params_for_build request.get? ? {} : resource_params end |
#update_resource(object, attributes) ⇒ Object
12 13 14 |
# File 'lib/brightcontent/strong_params_fix.rb', line 12 def update_resource(object, attributes) object.update_attributes(attributes) end |