Sha256: 9b3d514f9326aca1966f2fb4c154d10d3a9866e277b55a6577a32339785d8044

Contents?: true

Size: 455 Bytes

Versions: 13

Compression:

Stored size: 455 Bytes

Contents

module C80Map
  class Building < ActiveRecord::Base
    has_many :areas, :class_name => 'C80Map::Area', :dependent => :destroy
    belongs_to :building_representator, :polymorphic => true
    validates :coords, uniqueness: true
    after_save :update_json
    mount_uploader :img_bg, C80Map::BuildingImageUploader
    mount_uploader :img_overlay, C80Map::BuildingImageUploader

    private

    def update_json
      MapJson.update_json
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
c80_map-0.1.0.24 app/models/c80_map/building.rb
c80_map-0.1.0.23 app/models/c80_map/building.rb
c80_map-0.1.0.22 app/models/c80_map/building.rb
c80_map-0.1.0.21 app/models/c80_map/building.rb
c80_map-0.1.0.20 app/models/c80_map/building.rb
c80_map-0.1.0.19 app/models/c80_map/building.rb
c80_map-0.1.0.18 app/models/c80_map/building.rb
c80_map-0.1.0.17 app/models/c80_map/building.rb
c80_map-0.1.0.16 app/models/c80_map/building.rb
c80_map-0.1.0.15 app/models/c80_map/building.rb
c80_map-0.1.0.14 app/models/c80_map/building.rb
c80_map-0.1.0.13 app/models/c80_map/building.rb
c80_map-0.1.0.12 app/models/c80_map/building.rb