There is the following factory:
factory :car do
name 'Some car'
engine_value 1.6
color '#ff0000'
car_type
engine_type
transmission
drive_type
material
end
As you see there are a lot of associated objects. But code
attributes_for(:car)
generates only :name=>"Some car", :engine_value=>1.6, :color=>"#ff0000"}
hash. I need to get a hash with all attributes. How can I do it? Thanks.