space/app/models/building.rb

10 lines
217 B
Ruby

class Building
include Mongoid::Document
include Mongoid::Timestamps
include Slug
field :title, as: :slug_title, localize: true
mount_uploader :image, ImageUploader
has_many :floors, :dependent => :destroy
end