Module: VestalVersions::Associations::AssociationProxy

Defined in:
lib/vestal_versions/associations.rb

Defined Under Namespace

Modules: Reversion

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



40
41
42
43
44
# File 'lib/vestal_versions/associations.rb', line 40

def self.included(base) # :nodoc:
  base.class_eval do
    alias_method_chain :load_target, :reversion
  end
end

Instance Method Details

#load_target_with_reversionObject



46
47
48
49
50
# File 'lib/vestal_versions/associations.rb', line 46

def load_target_with_reversion
  @target = load_target_without_reversion
  revert_target if @reflection.options[:versioned]
  @target
end