bootstrap-ruby / bootstrap-editable-rails

In-place editing with Twitter Bootstrap for Rails
http://rubygems.org/gems/bootstrap-editable-rails
MIT License
216 stars 52 forks source link

All success responses are rendered as errors #7

Open gavinhughes opened 11 years ago

gavinhughes commented 11 years ago

All 200 response (including render :nothing) are rendered as errors.

Here's a vanilla app that shows this behavior: https://github.com/gavinhughes/editable.

tkawa commented 11 years ago

Thank you. It seems not to work with jQuery 1.9. I have no idea where is wrong, please try this anyway in Gemfile:

gem 'jquery-rails', '2.1.4'

Basically, this gem and X-editable are for update. X-editable has supported creating new record (with a bit problem). http://vitalets.github.com/x-editable/docs.html#newrecord but this gem has not yet.

gavinhughes commented 11 years ago

Tested the vanilla app on '2.1.4' and found no issues. It's only on '2.2.0'.

tkawa commented 11 years ago

head and render :nothing (include 204) will not work with jQuery 1.9.0.

To avoid it, you can respond with some value, not empty

format.json { render json: @post } # 200 OK