title: Passing parent id in nesting form in Ruby on Rails
body: <p><strong>Target</strong>: save comment for idea model.</p>
  
  <p><strong>Form:</strong></p>
  
  <pre><code>&lt;%= form_for([@idea, IdeaComment.new], :validate =&gt; true) do |f| %&gt;
          &lt;div class="control-group"&gt;
              &lt;div class="controls"&gt;
                  &lt;%= f.text_area :text, :placeholder =&gt; 'some text', :rows =&gt; 5 %&gt;
                  &lt;%= validate_errors(IdeaComment.new) %&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;%= f.button 'Comment', :class =&gt; 'button grad-green', :type =&gt; 'submit' %&gt;
      &lt;% end %&gt;
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code> @idea_comment = IdeaComment.new(params[:idea_comment])
   ...
  </code></pre>
  
  <p>But if we take a look for params hash:
  <img src="https://i.stack.imgur.com/Ab1vn.jpg" alt="enter image description here"></p>
  
  <p>How to pass idea_id to "idea_comment"?</p>