Module: PostgresExt::Postgis::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition
- Includes:
- ColumnMethods
- Defined in:
- lib/postgres_ext/postgis/active_record/connection_adapters/postgresql_adapter.rb
Instance Method Summary collapse
Methods included from ColumnMethods
Instance Method Details
#column(name, type, options = {}) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/postgres_ext/postgis/active_record/connection_adapters/postgresql_adapter.rb', line 45 def column(name, type, = {}) super column = self[name] if type.to_s == 'geometry' column.srid = [:srid] column.spatial_type = [:spatial_type] end self end |
#new_column_definition(name, type, options) ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/postgres_ext/postgis/active_record/connection_adapters/postgresql_adapter.rb', line 57 def new_column_definition(name, type, ) column = super column.srid = [:srid] column.spatial_type = [:spatial_type] column end |