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)

Instance Method Details

- (Object) versioned(*args)



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

- (Boolean) versioned?

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