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



3
4
5
# File 'lib/money_column/active_record_hooks.rb', line 3

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

Instance Method Details

#initialize_dupObject



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

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

#reloadObject



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

def reload(*)
  clear_money_column_cache if persisted?
  super
end