Sha256: 969e49283fa25a2f72a5ea2066ee6bf27226b6c32b875a49d36c2f625cac6e32

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

Stored size: 532 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_merge!(grape_routing_args) if env.key?(Grape::Env::GRAPE_ROUTING_ARGS)
            params.deep_symbolize_keys!
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
grape-2.0.0 lib/grape/extensions/hash.rb
grape-1.8.0 lib/grape/extensions/hash.rb