link_to param body

Hi everybody,

I’m developing an application, in this application I have a link that redirects me to other page.

The problem is:

-I want to add some params to this url, but I wanna hide this params “Like post request”(on the request body). How should I do it?

<%= link_to “New Post”, new_post_path %>

Well you have at least two options to “hide” the parameters:

You could change your link_to call and include :method=>:post so it does actually send a post request. This doesn’t really hide the parameters since the user can still view the source of the page and look at them.

You could send them as an encrypted parameter in the URL, then decrypt them on the receiving page. This actually obfuscates the parameter so the user can’t see the actual parameters.