Sha256: 62af119e7804377462bb47a025b6b12ae3beb6ebc2a604f5cda4c28b3fccd676
Contents?: true
Size: 310 Bytes
Versions: 6
Compression:
Stored size: 310 Bytes
Contents
module Trestle module ParamsHelper 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 end end
Version data entries
6 entries across 6 versions & 1 rubygems