x-editable-rails icon indicating copy to clipboard operation
x-editable-rails copied to clipboard

Patching the .editable submit method to allow programmatic submit

Open adamico opened this issue 10 years ago • 1 comments

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 :(

adamico avatar Jan 12 '16 15:01 adamico

I have this same issue... I've changed 'post' everywhere to 'put', but nothing works.

macpeluso avatar Mar 10 '16 04:03 macpeluso