Module: PgTypes

Defined in:
lib/pg_types.rb,
lib/pg_types/railtie.rb,
lib/pg_types/version.rb,
lib/pg_types/file_version.rb,
lib/pg_types/schema_dumper.rb,
lib/pg_types/type_definition.rb,
lib/pg_types/command_recorder.rb,
lib/pg_types/schema_statements.rb

Defined Under Namespace

Modules: CommandRecorder, SchemaDumper, SchemaStatements Classes: Error, FileVersion, Railtie, TypeDefinition

Constant Summary collapse

VERSION =
"0.2.3"

Class Method Summary collapse

Class Method Details

.databaseObject



26
27
28
# File 'lib/pg_types.rb', line 26

def database
  ActiveRecord::Base.connection
end

.loadObject



17
18
19
20
21
22
23
24
# File 'lib/pg_types.rb', line 17

def load
  # Add schema statements and command recorder
  ActiveRecord::ConnectionAdapters::AbstractAdapter.include PgTypes::SchemaStatements
  ActiveRecord::Migration::CommandRecorder.include PgTypes::CommandRecorder

  # Hook into the schema dumper
  ActiveRecord::SchemaDumper.prepend PgTypes::SchemaDumper
end