I would like to pass a parameter through a link_to method in Rails. I know there is a way to do it via the URL but I really don’t want to do that. Is there any way to pass a param via a link without adding it to the link itself?
I know in PHP you can post and then retrieve that value by using the post variable. Is there something similar in Rails?
link_tosignature looks as follows:So, POST would look like (lets say you want to POST user’s data):
User’s data can be retrieved in the controller using
params[:user]