app/models/city.rb in geopolitical-0.8.2 vs app/models/city.rb in geopolitical-0.8.3
- old
+ new
@@ -2,11 +2,11 @@
# Cities
#
class City
include Mongoid::Document
include Mongoid::Geospatial
- include Geopolitical::Helpers
+ include GeoHelper
field :gid, type: Integer
field :zip, type: String
field :slug, type: String
field :name, type: String, localize: true
@@ -23,10 +23,10 @@
belongs_to :nation
has_many :hoods
index name: 1
- scope :ordered, order_by(name: 1)
+ scope :ordered, -> { order_by(name: 1) }
validates :slug, presence: true, uniqueness: true
validates :name, uniqueness: { scope: :region_id }
# scope :close_to, GeoHelper::CLOSE