Module: VestalVersions::Versioned::ClassMethods
- Defined in:
- lib/vestal_versions/versioned.rb
Overview
Overrides the versioned
method to first define the versioned?
class method before deferring to the original versioned
.
Instance Method Summary collapse
- #versioned(*args) ⇒ Object
-
#versioned? ⇒ Boolean
For all ActiveRecord::Base models that do not call the
versioned
method, theversioned?
method will return false.
Instance Method Details
#versioned(*args) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/vestal_versions/versioned.rb', line 9 def versioned(*args) super(*args) class << self def versioned? true end end end |
#versioned? ⇒ Boolean
For all ActiveRecord::Base models that do not call the versioned
method, the versioned?
method will return false.
21 22 23 |
# File 'lib/vestal_versions/versioned.rb', line 21 def versioned? false end |