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

Making display_as more restful #521

Open joallard opened 8 years ago

joallard commented 8 years ago

So I just spent the whole day figuring out how to make a display_as a markdown-rendered column on the model without respond_with_bip. Turns out the response will contain display_as with a value of the changed column. Which column is not mentioned.

This method is pretty much custom to BIP and not very flexible. It wouldn't support, for instance, multiple attributes being changed.

@seuros would you accept a PR changing the response cycle to work with the attribute name as key in the response json instead of display_as?

I see this as one item out of many that stem from "sub-optimal" design decisions in here. More generally, how open would you be to non-trivial refactors of this gem?

seuros commented 8 years ago

display_with/as is not thread safe anyway . :+1: We will have to bump major version and update the documentation.

joallard commented 8 years ago

Coolbeans. Should we bunch up some other breaking changes we want to see in a major version? I just got into this gem, but since we'd bump up Major, we might as well get some other breaking changes in, I just don't know what the needs are. We make a milestone and talk about it?