app/models/hood.rb in geopolitical-0.8.3 vs app/models/hood.rb in geopolitical-0.8.4
- old
+ new
@@ -1,24 +1,21 @@
#
# Hood/Neighborhood
#
class Hood
include Mongoid::Document
+ include Geopolitocracy
- field :gid, type: Integer
- field :slug, type: String
- field :name, type: String, localize: true
field :souls, type: Integer
- field :zip, type: Integer
field :rank, type: Integer
+ field :zip, type: Integer
belongs_to :city
- validates :city, :name, presence: true
+ validates :city, :name, presence: true
scope :ordered, -> { order_by(name: 1) }
def to_s
name || slug
end
-
end