Sha256: a81789bc8160584968cff52b8ed2ef11dd450ff1a22a3eae0696020b99b17145
Contents?: true
Size: 822 Bytes
Versions: 1
Compression:
Stored size: 822 Bytes
Contents
module Og # This file contains a collection of 'marker' modules. You can # include these modules to your classes to pass hints to the # object manager (typically Og). # Marker module. If included in a class, the Og automanager # ignores this class. module Unmanageable def self.included(base) Og.unmanageable_classes << base end end # This is a marker module that denotes that the # base class follows the SingleTableInheritance # pattern. Ie, all the subclasses of the base # class are stored in the same schema (table). module SchemaInheritanceBase def self.included(base) # This class is a superclass in a single table inheritance # chain. So inject a special class ogtype field that # holds the class name. base.attr_accessor :ogtype, String, :sql => 'VARCHAR(30)' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
og-0.41.0 | lib/og/markers.rb |