Module: Og::SchemaInheritanceBase
- Defined in:
- lib/og/markers.rb
Overview
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).
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/og/markers.rb', line 22 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 |