Class: Historical::Models::ModelVersion::Meta

Inherits:
Object
  • Object
show all
Extended by:
Historical::MongoMapperEnhancements
Includes:
MongoMapper::EmbeddedDocument
Defined in:
lib/historical/models/model_version/meta.rb

Overview

A meta model which stores additional data to each new version (could be used for audits).

Class Method Summary collapse

Methods included from Historical::MongoMapperEnhancements

belongs_to_active_record

Class Method Details

.for_class(source_class) ⇒ Class

Retrieve customized class definition for a record class (e.g. TopicMeta, MessageMeta)

Returns:

  • (Class)


12
13
14
15
16
# File 'lib/historical/models/model_version/meta.rb', line 12

def self.for_class(source_class)
  Historical::Models::Pool.pooled(Historical::Models::Pool.pooled_name(source_class, self)) do
    Class.new(self)
  end
end