Currently, i use the following code for passing params[:id] to line_items create

<%= button_to 'Add to Cart', { controller: 'line_items', action: 'create', id: brick },  class: 'green radius nice button', method: :post, remote: true %>

However, it will append the id param on url query which i didn't suppose button_to to do. What i want is passing the id param via hidden the form field. Can i do that in button_to or any workaround for this issue?

Edit
Report