Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add POI attribution

  • Loading branch information...
commit fafd665888c650576cff8d23b6522fa59c8a5785 1 parent 2045f88
@siuying authored
View
2  app/helpers/geo_helper.rb
@@ -10,7 +10,7 @@ def point_to_poi(point, ref_point)
{
:actions => [],
:distance => point.distance_to(ref_point) * 1000,
- :attribution => "",
+ :attribution => point.attribution || "",
:id => "#{point.name}#{point.id}",
:imageURL => nil,
:lat => (point.lat * 1000000).to_i,
View
9 db/migrate/20090928122750_add_point_attrib.rb
@@ -0,0 +1,9 @@
+class AddPointAttrib < ActiveRecord::Migration
+ def self.up
+ add_column :points, :attribution, :string, :default => ""
+ end
+
+ def self.down
+ remove_column :points, :attribution
+ end
+end
View
5 db/schema.rb
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20090927173634) do
+ActiveRecord::Schema.define(:version => 20090928122750) do
create_table "points", :force => true do |t|
t.string "group"
@@ -21,7 +21,8 @@
t.decimal "lng"
t.datetime "created_at"
t.datetime "updated_at"
- t.string "point_type", :default => "0"
+ t.string "point_type", :default => "0"
+ t.string "attribution", :default => ""
end
add_index "points", ["group"], :name => "index_points_on_group"
Please sign in to comment.
Something went wrong with that request. Please try again.