Add uniqueness constraint on city_id
This commit is contained in:
parent
75ee2ab31d
commit
b311063ed7
|
@ -1,5 +1,6 @@
|
|||
class Thing < ActiveRecord::Base
|
||||
include Geokit::Geocoders
|
||||
validates_uniqueness_of :city_id, :allow_nil => true
|
||||
validates_presence_of :lat, :lng
|
||||
belongs_to :user
|
||||
has_many :reminders
|
||||
|
|
Loading…
Reference in New Issue