Sha256: c934d8b4106ddae3ccaeb8bdede8f859b3468a871a34f4c823e3a2c18d0863b3

Contents?: true

Size: 777 Bytes

Versions: 8

Compression:

Stored size: 777 Bytes

Contents

# frozen_string_literal: true

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

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

          def params_builder
            Grape::Extensions::ActiveSupport::HashWithIndifferentAccess::ParamBuilder
          end

          def build_params
            ::ActiveSupport::HashWithIndifferentAccess.new(rack_params).tap do |params|
              params.deep_merge!(grape_routing_args) if env.key?(Grape::Env::GRAPE_ROUTING_ARGS)
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
grape-2.3.0 lib/grape/extensions/active_support/hash_with_indifferent_access.rb
grape-2.2.0 lib/grape/extensions/active_support/hash_with_indifferent_access.rb
grape-2.1.3 lib/grape/extensions/active_support/hash_with_indifferent_access.rb
grape-2.1.2 lib/grape/extensions/active_support/hash_with_indifferent_access.rb
grape-2.1.1 lib/grape/extensions/active_support/hash_with_indifferent_access.rb
grape-2.1.0 lib/grape/extensions/active_support/hash_with_indifferent_access.rb
grape-2.0.0 lib/grape/extensions/active_support/hash_with_indifferent_access.rb
grape-1.8.0 lib/grape/extensions/active_support/hash_with_indifferent_access.rb