How to send post data with link_to_remote?


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 => },
: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…

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!