bernat / best_in_place

A RESTful unobtrusive jQuery Inplace-Editor and a helper as a Rails Gem
http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/
1.2k stars 571 forks source link

add multiple option for select #526

Open sbeam opened 8 years ago

sbeam commented 8 years ago

when option "multiple" is true, will process original value as array (joined on comma for now for display), and then pass array of selected options directly back to controller. Always adds a button because the change event is often fired spuriously when interacting with a multiselect.

(there seems to be desire for this feature (eg, #285) and it's working in production for me. Feedback welcome - PS this gem is great :+1: )

sbeam commented 8 years ago

getting an unrelated failure on "should be able to use bip_bool to change a boolean value using an image" locally on master, and now on CI as well. Not sure what is going on with that, will look into if I get a sec

EmmaB commented 8 years ago

This is great, although I'm getting Uncaught TypeError: Cannot read property 'indexOf' of undefined when there is no value.

sbeam commented 8 years ago

@EmmaB good catch - I made a commit to deal with that, does it work better?

EmmaB commented 8 years ago

@sbeam Sorry for the slow reply -- yes, that works perfectly.