Module: MoneyColumn::ActiveRecordHooks

Defined in:
lib/money_column/active_record_hooks.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/money_column/active_record_hooks.rb', line 6

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#initialize_dupObject



15
16
17
18
# File 'lib/money_column/active_record_hooks.rb', line 15

def initialize_dup(*)
  @money_column_cache = {}
  super
end

#reloadObject



10
11
12
13
# File 'lib/money_column/active_record_hooks.rb', line 10

def reload(*)
  clear_money_column_cache if persisted?
  super
end