lib/earth/hospitality/lodging_property.rb in earth-0.11.10 vs lib/earth/hospitality/lodging_property.rb in earth-0.11.11
- old
+ new
@@ -1,9 +1,9 @@
require 'earth/locality'
# Copyright 2011 Brighter Planet, Inc.
class LodgingProperty < ActiveRecord::Base
- set_primary_key :northstar_id
+ self.primary_key = "northstar_id"
# So Lodging can look up LodgingClass from LodgingProperty
belongs_to :lodging_class, :foreign_key => 'lodging_class_name'
col :northstar_id
@@ -16,14 +16,14 @@
col :lodging_rooms, :type => :integer
col :floors, :type => :integer
col :construction_year, :type => :integer
col :renovation_year, :type => :integer
col :lodging_class_name
- col :restaurant
- col :air_conditioning
- col :mini_bar
- col :refrigerator
- col :hot_tub
- col :pools_indoor, :type => :integer
- col :pools_outdoor, :type => :integer
+ col :restaurants, :type => :integer
+ col :ac_coverage, :type => :float
+ col :mini_bar_coverage, :type => :float
+ col :fridge_coverage, :type => :float
+ col :hot_tubs, :type => :float # float b/c fallback needs to be a float
+ col :pools_indoor, :type => :float # float b/c fallback needs to be a float
+ col :pools_outdoor, :type => :float # float b/c fallback needs to be a float
col :update_date
end