Class: Rubocop::Cop::ActiveRecordSerialize

Inherits:
RuboCop::Cop::Base
  • Object
show all
Defined in:
lib/rubocop/cop/active_record_serialize.rb

Overview

Cop that prevents the use of ‘serialize` in ActiveRecord models.

Constant Summary collapse

MSG =
'Do not store serialized data in the database, use separate columns and/or tables instead'

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



9
10
11
# File 'lib/rubocop/cop/active_record_serialize.rb', line 9

def on_send(node)
  add_offense(node.loc.selector) if node.children[1] == :serialize
end