In my controller I am running the following code:
@place = Place.new :latitude => params[:lat].to_d, :longitude=>params[:lng].to_d
puts @place.latitude
puts @place.longitude
@place.save!
puts @place.latitude
puts @place.longitude
And the output in my server log is as follows:
37.865338226051534
-122.25851513692476
37.09024
-95.712891
I understand the fact that it is being rounded, as I used precision 15 scale 10 decimals. But why is it changing the number to a completely different value?!
Turns out the library I was using was limiting the size during a calculation.