fixture_dependencies 1.2.4 → 1.2.5

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.
@@ -2,7 +2,11 @@ class << FixtureDependencies
2
2
  private
3
3
 
4
4
  def add_associated_object_S(reflection, attr, object, assoc)
5
- object.send("add_#{attr.to_s.singularize}", assoc) unless object.send(attr).include?(assoc)
5
+ if reflection[:type] == :one_to_one
6
+ object.send("#{reflection[:name]}=", assoc)
7
+ else
8
+ object.send("add_#{attr.to_s.singularize}", assoc) unless object.send(attr).include?(assoc)
9
+ end
6
10
  end
7
11
 
8
12
  def model_find_S(model, pk)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixture_dependencies
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 4
10
- version: 1.2.4
9
+ - 5
10
+ version: 1.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy Evans
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-15 00:00:00 -07:00
18
+ date: 2010-10-18 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21