x-editable-rails
x-editable-rails copied to clipboard
Patching the .editable submit method to allow programmatic submit
I've stumbled upon an annoying issue when I try to write integration tests with Rspec & Capybara to simulate filling in a text area with x-editable.
While I can set the value with the x-editable setValue() method:
$('.editable').editable('setValue', 'foobar')
When I try submitting the form with the submit() method:
$('.editable').editable('submit')
the patched .save from https://github.com/werein/x-editable-rails/blob/master/vendor/assets/javascripts/editable/rails/editable_form.js.coffee is not called.
I'd try submitting a fix, but it's beyond my current skills :(
I have this same issue... I've changed 'post' everywhere to 'put', but nothing works.