Module: Gluttonberg::Content::Versioning

Extended by:
ActiveSupport::Concern
Defined in:
lib/gluttonberg/content/versioning.rb

Overview

A mixin which allows for any arbitrary model to have multiple versions. It will generate the versioning models and add methods for creating, managing and retrieving different versions of a record. In reality this is behaving like a wrapper on acts_as_versioned

Defined Under Namespace

Modules: ClassMethods, OverrideActsAsVersioned

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.setupObject



14
15
16
# File 'lib/gluttonberg/content/versioning.rb', line 14

def self.setup
  ::ActiveRecord::Base.send :include, Gluttonberg::Content::Versioning
end

Instance Method Details

#versioned?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/gluttonberg/content/versioning.rb', line 18

def versioned?
  self.class.versioned?
end