auto_demeter 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,11 @@ module AutoDemeter
18
18
  if children_names && (match_data=method_id.to_s.match(reflected_children_regex)) && match_data[1].present?
19
19
  association_name=self.methods.include?(match_data[1]) ? match_data[1] : "#{self.class.name.underscore}_#{match_data[1]}"
20
20
  begin
21
- send(association_name) && send(association_name).respond_to?(match_data[2]) ? true : match_data[2][0..2] == 'is_'
21
+ if association=send(association_name)
22
+ association.respond_to?(match_data[2])
23
+ else
24
+ match_data[2][0..2] == 'is_'
25
+ end
22
26
  rescue
23
27
  false
24
28
  end
@@ -1,3 +1,3 @@
1
1
  module AutoDemeter
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_demeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: