Module: Padrino::ParamsProtection::ClassMethods
- Defined in:
- padrino-core/lib/padrino-core/application/params_protection.rb
Instance Method Summary collapse
-
#params(*allowed_params) ⇒ Object
Implements filtering of url query params.
Instance Method Details
#params(*allowed_params) ⇒ Object
Implements filtering of url query params. Can prevent mass-assignment.
39 40 41 42 43 44 45 |
# File 'padrino-core/lib/padrino-core/application/params_protection.rb', line 39 def params(*allowed_params) allowed_params = prepare_allowed_params(allowed_params) condition do @original_params = Utils.deep_dup(params) filter_params!(params, allowed_params) end end |