Module: Grape::Extensions::Hash::ParamBuilder

Extended by:
ActiveSupport::Concern
Defined in:
lib/grape/extensions/hash.rb

Instance Method Summary collapse

Instance Method Details

#build_paramsObject


13
14
15
16
17
# File 'lib/grape/extensions/hash.rb', line 13

def build_params
  params = Grape::Extensions::DeepMergeableHash[rack_params]
  params.deep_merge!(grape_routing_args) if env[Grape::Env::GRAPE_ROUTING_ARGS]
  post_process_params(params)
end

#post_process_params(params) ⇒ Object


19
20
21
# File 'lib/grape/extensions/hash.rb', line 19

def post_process_params(params)
  Grape::Extensions::DeepSymbolizeHash.deep_symbolize_keys_in(params)
end