class RuboCop::Cop::Rails::HashSerializer

This cop checks for the use of the serialize Hash macro.

@example

# bad
# serialize :params, Hash

# good
# serialize :params, JSON

Constants

MSG
RESTRICT_ON_SEND

Public Instance Methods

on_send(node) click to toggle source
# File lib/rubocop/cop/hash_serializer_cops.rb, line 22
def on_send(node)
  return unless serializable_hash?(node)

  add_offense(node)
end