From f6f147be83ca995ac0211e95c3af2af52158f9bb Mon Sep 17 00:00:00 2001 From: Ivana Vasilj Date: Thu, 19 Apr 2012 14:22:09 +0200 Subject: [PATCH] add fsq_id to bar model --- app/models/non_smoking_bar.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/non_smoking_bar.rb b/app/models/non_smoking_bar.rb index fac99ac..b3fceac 100644 --- a/app/models/non_smoking_bar.rb +++ b/app/models/non_smoking_bar.rb @@ -2,12 +2,12 @@ class NonSmokingBar include Mongoid::Document include Mongoid::Spacial::Document - # id is the same as the 4sq id field :name, type: String field :address, type: String - field :coords, type: Array, spacial: true + field :coords, type: Array, spacial: true # longitude latitude array in that order - [lng, lat] + field :fsq_id, type: String # foursquare id != _id - validates_presence_of :name, :coords + validates_presence_of :name, :coords, :fsq_id spacial_index :coords end