Module: ParamProtected::ControllerModifications::ClassMethods
- Defined in:
- lib/param_protected/controller_modifications.rb
Instance Method Summary collapse
- #inherited_with_protector(controller) ⇒ Object
- #param_accessible(params, actions = nil) ⇒ Object
- #param_protected(params, actions = nil) ⇒ Object
Instance Method Details
#inherited_with_protector(controller) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/param_protected/controller_modifications.rb', line 23 def inherited_with_protector(controller) inherited_without_protector(controller) if defined? @pp_protector controller.instance_variable_set :@pp_protector, @pp_protector.dup controller.class_eval { attr_reader :pp_protector } end end |
#param_accessible(params, actions = nil) ⇒ Object
19 20 21 |
# File 'lib/param_protected/controller_modifications.rb', line 19 def param_accessible(params, actions = nil) Protector.instance(self).declare_protection(params, actions, WHITELIST) end |
#param_protected(params, actions = nil) ⇒ Object
15 16 17 |
# File 'lib/param_protected/controller_modifications.rb', line 15 def param_protected(params, actions = nil) Protector.instance(self).declare_protection(params, actions, BLACKLIST) end |