Link_to :method => post


#1

hi,
how to pass values when using a link_to with method => post?

regards.


#2

Jean-sébastien Jney wrote:

hi,
how to pass values when using a link_to with method => post?

regards.

Seems like a slightly odd thing to do, but I’m sure it can be done. I
suppose you could use link_to_function with “this.form.submit()” as the
function.


#3

I guess the quick and dirty way is just add it as part of your url link.

Example:

link_to ‘name’, {…, :param => ‘test’}, :method => :post


#4

i just find this ticket : http://dev.rubyonrails.org/ticket/8106.
it seems what i want to do isn’t possible yet.