Flowdock
method

transform_symbol_keys

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: Arguments
transform_symbol_keys(hash, symbol_keys) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activejob/lib/active_job/arguments.rb, line 157
      def transform_symbol_keys(hash, symbol_keys)
        # NOTE: HashWithIndifferentAccess#transform_keys always
        # returns stringified keys with indifferent access
        # so we call #to_h here to ensure keys are symbolized.
        hash.to_h.transform_keys do |key|
          if symbol_keys.include?(key)
            key.to_sym
          else
            key
          end
        end
      end
Register or log in to add new notes.