Class: ParamAccessible::Rules
- Inherits:
-
Array
- Object
- Array
- ParamAccessible::Rules
- Defined in:
- lib/param_accessible/rules.rb
Instance Method Summary collapse
- #detect_inaccessible_params(controller) ⇒ Object
-
#initialize(parent = nil) ⇒ Rules
constructor
A new instance of Rules.
- #push(*args) ⇒ Object
Constructor Details
#initialize(parent = nil) ⇒ Rules
Returns a new instance of Rules.
5 6 7 8 |
# File 'lib/param_accessible/rules.rb', line 5 def initialize parent = nil content = (parent.to_a if parent) || [] super content end |
Instance Method Details
#detect_inaccessible_params(controller) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/param_accessible/rules.rb', line 10 def detect_inaccessible_params controller accessible_params = {} each do |rule| rule.accessible_params_for controller, accessible_params end detect_inaccessible_hash controller.params, accessible_params, [] end |