module PostgresExt::Postgis::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::Quoting
Public Instance Methods
quote(value, column = nil)
click to toggle source
Calls superclass method
# File lib/postgres_ext/postgis/active_record/connection_adapters/postgresql_adapter.rb, line 68 def quote(value, column = nil) if column && (column.type == :geometry || column.type == :geography) ActiveRecord::ConnectionAdapters::PostgreSQLColumn.geometry_to_string(value) else super end end
type_cast(value, column, array_member = false)
click to toggle source
Calls superclass method
# File lib/postgres_ext/postgis/active_record/connection_adapters/postgresql_adapter.rb, line 76 def type_cast(value, column, array_member = false) return super unless column case value when RGeo::Feature::Instance return super unless /geometry|geography/ =~ column.sql_type ActiveRecord::ConnectionAdapters::PostgreSQLColumn.geometry_to_string(value) else super end end