thoughtbot/factory_girl — Issue #221: Support nested_attributes
Author: pacoguzman
Created: 2011-10-22 10:41:34+00:00
State: open

To add values to the nested attributes for some of my Models, I have to do the following

````ruby
factory(:avatar) do
icon 'smiling'
end

factory(:user) do
avatar_attributes { attributes_for(:avatar) }
end
````

It'd be wonderful if I could just do:

````ruby
factory(:user) do
avatar_attributes
end
````
or
````ruby
factory(:user) do
nested_attributes :avatar, :factory => :awesome_avatar, {:icon => 'override_awesome_avatar'}
end

What do you thing about it? By know I've resolved for has_one association but not for has_many associations maybe related with #202