build_associated 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,13 +10,13 @@ module BuildAssociated
10
10
  remove_method(association_name)
11
11
 
12
12
  define_method association_name do
13
- obj = self.send("_#{association_name}") || super
13
+ obj = self.send("_#{association_name}") || super(association_name)
14
14
  obj ||= self.send("build_#{association_name}") unless self.frozen? or self.readonly?
15
15
  return obj
16
16
  end
17
17
  rescue NameError
18
18
  define_method association_name do
19
- obj = super
19
+ obj = super(association_name)
20
20
  obj ||= self.send("build_#{association_name}") unless self.frozen? or self.readonly?
21
21
  return obj
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module BuildAssociated
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build_associated
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-23 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &26988500 !ruby/object:Gem::Requirement
16
+ requirement: &26401920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *26988500
24
+ version_requirements: *26401920
25
25
  description: Have ActiveRecord automagically build an association when accessed. Useful
26
26
  for belongs_to associations which should never be nil.
27
27
  email: