thoughtbot/factory_girl — Issue #297: Dependent attributes broken in 1.3.3
Author: benfyvie
Created: 2012-02-16 18:29:08+00:00
State: open

The change in version 1.3.3 seems to have broken dependent attributes. Take the following:
```ruby
Factory.define :post do |p|
p.author {|factory| factory.association(:user, :last_name => 'Writely') }
p.signature {lfactory| factory.association(:signature, :user => factory.author, :visible => true}
end
```

The problem here is that factory.author is returning nil.

The bug was introduced here:
https://github.com/thoughtbot/factory_girl/commit/3923d2072c203fc4043b7ad0a88fb80d436b3e27

One solution (though not ideal) would be to have the ability to access factory.new_attributes.author