app/models/city.rb in geopolitical-0.8.3 vs app/models/city.rb in geopolitical-0.8.4

- old
+ new

@@ -2,17 +2,13 @@ # Cities # class City include Mongoid::Document include Mongoid::Geospatial - include GeoHelper + include Geopolitocracy - field :gid, type: Integer field :zip, type: String - field :slug, type: String - field :name, type: String, localize: true - field :ascii, type: String field :area, type: Integer field :souls, type: Integer field :geom, type: Point, spatial: true spatial_scope :geom @@ -26,11 +22,11 @@ index name: 1 scope :ordered, -> { order_by(name: 1) } validates :slug, presence: true, uniqueness: true - validates :name, uniqueness: { scope: :region_id } + validates :name, uniqueness: { scope: :nation_id } # scope :close_to, GeoHelper::CLOSE before_validation :set_defaults @@ -48,7 +44,6 @@ end def <=>(other) slug <=> other.slug end - end