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



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

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

Instance Method Details

#initialize_dupObject



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

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

#reloadObject



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

def reload(*)
  clear_money_column_cache if persisted?
  super
end