How to send post data with link_to_remote?

Hi,

I’m trying to send a post body with my link_to_remote call.

Prototype supports the ‘postBody’ option, but I can’t seem to get
link_to_remote to set that.

Here’s what I’m trying:

link_to_remote ‘move up’,
:url => { :controller => ‘upload’, :action => ‘position_ajax’, :id =>
upload.id },
:method => ‘post’,
:postBody => ‘amount=-1’

But no dice.

I looked at the source for prototype_helper.rb
and it looks like postBody is not in the supported options hash.

Or is the idea that I create a dummy form and associate the
link_to_remote with that?

not a bug!

check that out…

http://codefluency.com/articles/2006/06/02/rails-views-using-the-with-option

Ah, :with. That looks good.

Now we just need this added to the docs. There’s a little blurb on :with
in the API docs for observe_field…

Thanks Peter!