Nested form_for in rails
<p>I have <code>Test</code> model and <code>User</code> model. <code>Test</code> model is having many <code>users</code>. Test controller is as below.</p>

<pre><code>class TestController
   def create
      Test.create(testparams)
   end

   private
   def testparams
      params.require(:test).permit(:test_name,user_attributes:[:user_name])
   end
end
</code></pre>

<p>In the above code new Test would be created. I want to create new users for a existing test.How to do that??</p>