Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

204 response from server should not add .editable-unsaved css class to <a> #21

Closed
KeithP opened this issue Jun 16, 2014 · 1 comment
Closed

Comments

@KeithP
Copy link

KeithP commented Jun 16, 2014

On update the Rails controller correctly responds with 204 No Content, but the "editable-unsaved" css class is added to the anchor tag.

Using Rails 4.1, ruby 1.9.1, jquery-rails-3.1.0, bootstrap 3

@tkawa
Copy link
Member

tkawa commented Jul 3, 2014

Thank you for reporting 😄
It seems an X-editable's bug.

It will work by this fix:

https://github.com/bootstrap-ruby/bootstrap-editable-rails/blob/master/vendor/assets/javascripts/bootstrap-editable.js#L1845

-                sent = sent || (this.options.savenochange && this.input.value2str(this.value) !== this.input.value2str(params.newValue));
+                sent = sent || (this.input.value2str(this.value) !== this.input.value2str(params.newValue));

It should be fixed on the original source, so I'll send a pull request to X-editable.
Meanwhile, please try this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants