geokit / geokit-rails

Official Geokit plugin for Rails/ActiveRecord. Provides location-based goodness for your Rails app. Requires the Geokit gem.
MIT License
1.57k stars 245 forks source link

Change field Type for Calculations #132

Closed diegomonteiro closed 6 years ago

diegomonteiro commented 6 years ago

Desse jeito mesmo que os campos sejam do tipo string serão convertidos para float.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 48.81% when pulling 1d3d2d6b77e41280edfae1d7287eb166de75ed07 on diegomonteiro:master into 9e5251afb76f14a5a2cd975023f0a0fab1e0cc80 on geokit:master.

mnoack commented 6 years ago

@diegomonteiro Thanks for the Pull Request and sorry I haven't reviewed it earlier. I have 3 main comments. 1) Feel free to ignore the hound (bot) for now, it's more a guidance tool 2) Why are you casting to float? What is the issue when it doesn't do this? 3) What are the other changes in this PR, e.g " || lat_column_name" - This change appears unrelated to your float issue and I don't even understand how it works, it will never be lat_column_name because the other part of the "or" condition is a string so will always evaluate to a truthy value so it will never be this.

mnoack commented 6 years ago

Closing as I had questions which need to be answered. Feel free to answer them and we can re-open this PR.