auto_demeter 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,8 @@ module AutoDemeter
21
21
  begin
22
22
  if association=send(association_name)
23
23
  association.respond_to?(match_data[2])
24
+ elsif association.nil?
25
+ association_name.camelize.constantize.new.respond_to?(match_data[2])
24
26
  else
25
27
  match_data[2][0..2] == 'is_'
26
28
  end
@@ -1,3 +1,3 @@
1
1
  module AutoDemeter
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
@@ -74,5 +74,7 @@ end)
74
74
  assert_equal @paul.name, @luke_address.user_manager_name
75
75
  assert_equal @paul.name, @luke_address.user_manager.name
76
76
  assert_equal @paul.name, @luke_address.user.manager_name
77
+ @luke.address=nil
78
+ assert @luke.respond_to?(:address_postcode)
77
79
  end
78
80
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_demeter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul McKibbin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2016-09-23 00:00:00 Z
18
+ date: 2016-11-17 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: sqlite3