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? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Is hard to hide the qiery string but i can be done , how many params you have? On Tue, Sep 7, 2010 at 4:44 AM, Priyanka Pathak <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>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? > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Sep 7, 2010 at 3:44 AM, Priyanka Pathak <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>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?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. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.