method

serialize_hash_key

rails latest stable - Class: ActiveJob

Method deprecated or moved

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

serialize_hash_key(key)
public

No documentation available.

# File activejob/lib/active_job/arguments.rb, line 178
      def serialize_hash_key(key)
        case key
        when *RESERVED_KEYS
          raise SerializationError.new("Can't serialize a Hash with reserved key #{key.inspect}")
        when String, Symbol
          key.to_s
        else
          raise SerializationError.new("Only string and symbol hash keys may be serialized as job arguments, but #{key.inspect} is a #{key.class}")
        end
      end