link_to with :method as :post

Hello,
      I am using link_to helper to post the request. i want to hide the
extra parameters. so i have tried :method => :post also :post => true.
but it's not works for me. still it shows query string. can any one
suggest proper solution?

Is hard to hide the qiery string but i can be done , how many params you have?

POST is not the same as “GET with the parameters hidden.” Read about the HTTP methods here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

Basically, GET is for retrieval, and POST is for resource creation. If you’re doing a retrieval, the method should be GET, not POST. There’s a reason anchor tags (created by link_to) cannot do POST: because they are just supposed to link two documents together, not affect state.

Priyanka Pathak wrote:

Hello,
      I am using link_to helper to post the request. i want to hide the
extra parameters. so i have tried :method => :post also :post => true.
but it's not works for me. still it shows query string. can any one
suggest proper solution?

Hi,
    I have make the patch in rails 2.3.5 and my problem is solved. Here
is the source for it
http://dev.rubyonrails.org/attachment/ticket/8106/add_ability_to_specify_post_variables_with_link_to.diff