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 573 forks source link

Fix collection display #610

Open cbisnett opened 5 years ago

cbisnett commented 5 years ago

When generating the output for a collection or checkbox using display_as or display_with the result is reformatted to match an option of the collection. After editing and selecting a different option, the output is rendered using the result from the display helper so the outputs differ from what's initially rendered and when an edit is made. This change only reformats the output to match a collection option when not using display_as or display_with so the behavior is consistent.