Module: SnFoil::Rails::InjectRequestParams

Extended by:
ActiveSupport::Concern
Defined in:
lib/snfoil/rails/concerns/inject_request_params.rb

Instance Method Summary collapse

Instance Method Details

#inject_request_params(**options) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/snfoil/rails/concerns/inject_request_params.rb', line 24

def inject_request_params(**options)
  return options if options[:params]
  return options unless params

  options[:params] = params.to_unsafe_h.deep_symbolize_keys
  options[:request_params] = options[:params].deep_dup
  options
end