bernat / best_in_place

A RESTful unobtrusive jQuery Inplace-Editor and a helper as a Rails Gem
http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/
1.2k stars 573 forks source link

support for ajaxDataType='script' #594

Closed lacco closed 9 months ago

lacco commented 6 years ago

I wanted to use this gem with a server-generated JavaScript response (just loading the updated value via JSON was not enough). I needed to change two things to make it work:

  1. The dataType of the ajax request must be script instead of json
  2. The loadSuccessCallback should not try to parse responses which are not JSON

In case someone else is interested in this, I am willing to put a little more work into this to get this merged!