Sha256: eb2f40cfb56678dc46273698ffa572b7ae5a17effb43490a3fcab2521fd6edb4

Contents?: true

Size: 617 Bytes

Versions: 5

Compression:

Stored size: 617 Bytes

Contents

# frozen_string_literal: true

module Grape
  module Extensions
    module Hash
      module ParamBuilder
        extend ::ActiveSupport::Concern

        included do
          namespace_inheritable(:build_params_with, Grape::Extensions::Hash::ParamBuilder)
        end

        def build_params
          rack_params.deep_dup.tap do |params|
            params.deep_symbolize_keys!

            if env.key?(Grape::Env::GRAPE_ROUTING_ARGS)
              grape_routing_args.deep_symbolize_keys!
              params.deep_merge!(grape_routing_args)
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
grape-2.2.0 lib/grape/extensions/hash.rb
grape-2.1.3 lib/grape/extensions/hash.rb
grape-2.1.2 lib/grape/extensions/hash.rb
grape-2.1.1 lib/grape/extensions/hash.rb
grape-2.1.0 lib/grape/extensions/hash.rb