class ActiveVersioning::Model::VersionProxy
Constants
- VersionInvalid
VersionProxy
classUses Ruby's Delegator class to delegate methods to the versioned resource. The bulk of this class overrides the Rails save, update, and reload methods to modify the record in the versions table as opposed to the versioned resource.
A `commit` instance method writes to the versioned resource's record.
Attributes
version[R]
Public Class Methods
new(version)
click to toggle source
# File lib/active_versioning/model/version_proxy.rb, line 18 def initialize(version) @version = version __setobj__(version.reify) end
Public Instance Methods
__getobj__()
click to toggle source
# File lib/active_versioning/model/version_proxy.rb, line 23 def __getobj__ @record end
__setobj__(record)
click to toggle source
# File lib/active_versioning/model/version_proxy.rb, line 27 def __setobj__(record) @record = record end