Sha256: d15849d929da253888a5c24c05ed77a774ee8447d9bfac0d686ad36d9db013d3
Contents?: true
Size: 603 Bytes
Versions: 6
Compression:
Stored size: 603 Bytes
Contents
require 'c80_map_floors/base_map_object' module C80MapFloors class Area < ActiveRecord::Base belongs_to :floor belongs_to :area_representator, :polymorphic => true acts_as_base_map_object def my_as_json result = { id: self.id, tag: self.tag, floor_id: self.floor_id, class_name: self.class_name, coords: self.coords, data: nil } if self.area_representator.present? result[:data] = self.area_representator.my_as_json2 end result.as_json end end end
Version data entries
6 entries across 6 versions & 1 rubygems