bernat/best_in_place — pull request #129 by straydogstudio (2012-04-12 21:41:05+00:00)
Title: Added HTML5 :data to helper. Added section to REAME for ajax:success

When using best_in_place for several hundred rows of data, it made sense to provide unique data per instance for the ajax:success callback while keeping things unobtrusive. I've added a :data => Hash parameter to the helper, similar to link_to in Rails. It converts the hash to HTML data attributes on the span which can then be retrieved by the callback.

Added a section to the README that demonstrates the use of bind for the ajax:success trigger and the :data attribute.

Rspec test added to test the :data param.

For my purposes, I needed to convert $ to jQuery. I've seen the pull request from tschmitz has not been merged. It is here as well.

Cheers,
Noel