title: How to pass parameters through the associations chain in FactoryGirl
body: <p>By default, FactoryGirl calls the factories of associations to create them. I can pass a association for a factory as a parameter. But how can I passa an object which should be used deep in the associations chain?</p>
  
  <p>For example:</p>
  
  <p>I have a Post, which has  a PostsManager,  which has an Account, which belongs to the current_user.</p>
  
  <p>When I do a <code>Factory(:post)</code> it creates an PostsManager, which creates an Account, which doesn't belongs to the (stubed) current_user.</p>
  
  <p>So, in specs that use the Post factory I have to do:</p>
  
  <pre><code>account = Factory(:account, user: current_user)
  post_manager = Factory(:post_manager, account: account)
  post = Factory(:post, post_manager: post_manager)
  </code></pre>
  
  <p>What I would like to do is call the factory  with <code>Factory(:post, user: current_user)</code>, and then pass <code>current_user</code> all the way through the associations to the Account factory. Is there a way to do it so?</p>