Point in Rails Form Builder
siegfried opened this issue · 2 comments
siegfried commented
I use fields_for to create input element for Point.
= f.fields_for :location do |location|
= location.text_field :x
= location.text_field :y
This way can create point correctly, but it cannot load the correct values when edit a record. The result is same when I use "latitude" and "longitude" instead of "x" and "y". What way do you recommend? Thanks.
nofxx commented
I was using a similar approach and I believe it worked, and it should. Could you paste more code? model?
I'm using a single field, split commas. (x,y,z). But should work your way too.
siegfried commented
Excuse me, I cannot find the code. I've switched to PostgreSQL.