rails/jquery-ujs — Issue #216: Adding data before the request is sent
Author: Sephi-Chan
Created: 2011-10-22 15:11:20+00:00
State: open

Hello,

I'm looking for a simple way to add additional data to the request before it is sent.

The attribute data-params could do the job but it's a pain to use it, especially when you want to send an object and/or when the data come from different sources.

What I would like to do is:

```
$button.bind("ajax:before", (event)->
event.addData({
target_id: targetId,
units_count: $slider.slider("value")
});
return true;
)
```

If I add this feature, is it likely to be integrated? Have you any advices to do so?

Thanks!