Issue with Rails' new `point` handling.
Closed this issue · 1 comments
LeoAdamek commented
Rails 5.1 will change the default handling of point
fields from an array of x and y coordinates, to use the ActiveRecord::Point
type, with x and y members.
It is possible in Rails 5.0 to use this new behaviour already with the following:
attribute :field_name, :point
However when using activerecord-postgis-adapter with this configuration, the following error occurs:
ArgumentError: Unknown type :point
from $RAILS_ROOT/app/vendor/ruby/2.3.0/gems/activemodel-
5.0.1/lib/active_model/type/registry.rb:20:in `lookup'
Any ideas how this can be resolved?
PelagicDev commented
Just curious, but did you see this section in the readme @LeoAdamek?
When using this library, you should using the :st_point
point type.