title: How to create objects for inserting in DB using ruby on rails
body: <p>Again I stuck with simple ruby app.
  Before I created it using forms, but now I rewrited it using AJAX.
  In body of AJAX I've got:</p>
  
  <pre><code>commenter:John Doe
  body:Mint
  </code></pre>
  
  <p>in controller (it old part from part with forms)</p>
  
  <pre><code> @comment = @article.comments.create(comment_params)
  </code></pre>
  
  <p>How I could pass values from my request to comment_params (I mean comment and body to save it in db)?
   here perfomance of the comment:</p>
  
  <pre><code>  private
      def comment_params
        params.require(:comment).permit(:commenter, :body)
      end
  </code></pre>