method

undasherize_keys

rails latest stable - Class: ActiveSupport::CoreExtensions::Hash::Conversions::ClassMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.2.6) is shown here.

undasherize_keys(params)
private

No documentation available.

# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 183
            def undasherize_keys(params)
              case params.class.to_s
                when "Hash"
                  params.inject({}) do |h,(k,v)|
                    h[k.to_s.tr("-", "_")] = undasherize_keys(v)
                    h
                  end
                when "Array"
                  params.map { |v| undasherize_keys(v) }
                else
                  params
              end
            end