lib/lodging/relationships.rb in lodging-0.0.12 vs lib/lodging/relationships.rb in lodging-0.0.13
- old
+ new
@@ -1,11 +1,13 @@
module BrighterPlanet
module Lodging
module Relationships
def self.included(target)
- target.belongs_to :lodging_class, :foreign_key => 'lodging_class_name'
target.belongs_to :zip_code, :foreign_key => 'zip_code_name'
target.belongs_to :state, :foreign_key => 'state_postal_abbreviation'
+ target.belongs_to :country, :foreign_key => 'country_iso_3166_code'
+ target.belongs_to :lodging_class, :foreign_key => 'lodging_class_name'
+ target.belongs_to :property, :foreign_key => 'property_northstar_id', :class_name => 'LodgingProperty'
end
end
end
end