Module: NormalizeAttributes::ActiveRecord

Defined in:
lib/normalize_attributes/active_record.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/normalize_attributes/active_record.rb', line 47

def self.included(base)
  base.instance_eval do
    extend ClassMethods
    include InstanceMethods
    before_validation :normalize_attributes

    class << self
      attr_accessor :normalize_options
    end
  end
end