lodging 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lodging/fallback.rb +9 -0
- data/lib/lodging/relationships.rb +11 -0
- data/lib/test_support/lodging_record.rb +0 -4
- metadata +6 -4
@@ -0,0 +1,11 @@
|
|
1
|
+
module BrighterPlanet
|
2
|
+
module Lodging
|
3
|
+
module Relationships
|
4
|
+
def self.included(target)
|
5
|
+
target.belongs_to :lodging_class, :foreign_key => 'lodging_class_name'
|
6
|
+
target.belongs_to :zip_code, :foreign_key => 'zip_code_name'
|
7
|
+
target.belongs_to :state, :foreign_key => 'state_postal_abbreviation'
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -6,8 +6,4 @@ require 'sniff'
|
|
6
6
|
class LodgingRecord < ActiveRecord::Base
|
7
7
|
include Sniff::Emitter
|
8
8
|
include BrighterPlanet::Lodging
|
9
|
-
|
10
|
-
belongs_to :lodging_class, :foreign_key => 'lodging_class_name'
|
11
|
-
belongs_to :zip_code, :foreign_key => 'zip_code_name'
|
12
|
-
belongs_to :state, :foreign_key => 'state_postal_abbreviation'
|
13
9
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lodging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andy Rossmeissl
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date: 2010-12-
|
22
|
+
date: 2010-12-07 00:00:00 -06:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
@@ -169,6 +169,8 @@ files:
|
|
169
169
|
- lib/lodging/carbon_model.rb
|
170
170
|
- lib/lodging/characterization.rb
|
171
171
|
- lib/lodging/data.rb
|
172
|
+
- lib/lodging/fallback.rb
|
173
|
+
- lib/lodging/relationships.rb
|
172
174
|
- lib/lodging/summarization.rb
|
173
175
|
- lib/test_support/lodging_record.rb
|
174
176
|
- features/support/env.rb
|