January 2015

Adding a custom Postgresql Type with Rails 4.2

In one of my Rails applications, we are using the PostGIS custom Postgres data type GEOGRAPHY. When ActiveRecord stumbles across this data type, by default it does not know what to do with it. Prior to Rails 4.1, there was a utility method on the ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID module called register_type. In Rails 4.2, this method was… Read more Adding a custom Postgresql Type with Rails 4.2