Module: Activerecord::Multirange

Defined in:
lib/activerecord-multirange.rb,
lib/activerecord-multirange/adapter.rb,
lib/activerecord-multirange/quoting.rb,
lib/activerecord-multirange/version.rb,
lib/activerecord-multirange/type_map.rb,
lib/activerecord-multirange/oid/multi_range.rb,
lib/activerecord-multirange/table_definition.rb,
lib/activerecord-multirange/schema_statements.rb

Defined Under Namespace

Modules: Adapter, OID, Quoting, SchemaStatements, TableDefinition, TypeMap Classes: Error

Constant Summary collapse

VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.add_multirange_column_typeObject



15
16
17
18
19
20
21
22
23
# File 'lib/activerecord-multirange.rb', line 15

def self.add_multirange_column_type
  ActiveSupport.on_load(:active_record) do
    ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(Adapter)
    ActiveRecord::ConnectionAdapters::PostgreSQL::OID::TypeMapInitializer.prepend(TypeMap)
    ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting.prepend(Quoting)
    ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements.prepend(SchemaStatements)
    ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition.prepend(TableDefinition)
  end
end