Module: VestalVersions::Reload

Extended by:
ActiveSupport::Concern
Defined in:
lib/vestal_versions/reload.rb

Overview

Ties into the existing ActiveRecord::Base#reload method to ensure that version information is properly reset.

Instance Method Summary collapse

Instance Method Details

#reload(*args) ⇒ Object

Overrides ActiveRecord::Base#reload, resetting the instance-variable-cached version number before performing the original reload method.



11
12
13
14
# File 'lib/vestal_versions/reload.rb', line 11

def reload(*args)
  reset_version
  super
end