Skip to content

Instantly share code, notes, and snippets.

@arslan-gg
Created September 3, 2017 04:46
Show Gist options
  • Save arslan-gg/bfa6db5cbdb0d14b2feed91cd5d209ee to your computer and use it in GitHub Desktop.
Save arslan-gg/bfa6db5cbdb0d14b2feed91cd5d209ee to your computer and use it in GitHub Desktop.
How to store coordinates in Ruby on Rails
class CreatePlaces < ActiveRecord::Migration[5.1]
def change
create_table :places do |t|
t.decimal "lat", precision: 10, scale: 6
t.decimal "lng", precision: 10, scale: 6
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment