I have this method to post the value to the "/store/add_to_cart"
<form action = "/store/add_to_cart" method="post">
<% for product in @products -%>
<div class = "entry">
<%= product.title %>
<%= product.price %>
<p>
</div>
<% end %>
<%= select( "payment", "id", { "Visa" => "1", "Mastercard" => "2"}) %>
<%= submit_tag 'Make Order' %>
</form>
In the /store/add_to_cart.html.erb, I created :
<%= params.length %>
<% for i in params%>
<%=i%>
<br/>
<% end %>
But I get this error: ActionController::InvalidAuthenticityToken in StoreController#add_to_cart
What's happen? but after I change it to the get method, I can get all the params, wt's happen?