Skip to content

Instantly share code, notes, and snippets.

@boyvanamstel
Created May 19, 2011 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boyvanamstel/980981 to your computer and use it in GitHub Desktop.
Save boyvanamstel/980981 to your computer and use it in GitHub Desktop.
Longitude Latitude in Rails
class Poi < ActiveRecord::Migration
def self.up
create_table :pois, :id => :poi_id do |t|
t.column :longitude, :decimal, :precision => 10, :scale => 7
t.column :latitude, :decimal, :precision => 10, :scale => 7
end
end
def self.down
drop_table :pois
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment