Module: Trestle::ParamsHelper
- Defined in:
- app/helpers/trestle/params_helper.rb
Instance Method Summary collapse
Instance Method Details
#persistent_params ⇒ Object
3 4 5 6 7 8 |
# File 'app/helpers/trestle/params_helper.rb', line 3 def persistent_params flat, nested = Trestle.config.persistent_params.partition { |p| !p.is_a?(Hash) } nested = nested.inject({}) { |result, param| result.merge(param) } params.slice(*(flat + nested.keys)).permit(*(flat << nested)) end |