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

Unable to set the option - saveonchange as "never" #6

Closed indykish closed 11 years ago

indykish commented 11 years ago

Let us say the rails app has a link as below:

I use the latest version of bootstrap-editable-rails gem.

<%= link_to "howdy1","#", :id => "identity_new_account_name", :class => "s_account_name" %>

I load the javascript with the following code.

// init editables
                    jQuery('.s_account_name').editable({});

                    jQuery('#identity_new_account_name').editable('option',
                            'validate', function(v) {
                                if (!v)
                                    return 'Required field!';
                            });

                    jQuery('#identity_new_account_name').editable('option', 'send', 'never');

                    jQuery('#identity_new_account_name').editable('option', 'savenochange', 'never');
tkawa commented 11 years ago

Thank you.

.editable('option', 'send', 'never') is not supported yet. send option is ignored.

I want to fix in the next version.