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

Disable Placeholder? #545

Closed duffyjp closed 8 years ago

duffyjp commented 8 years ago

screen shot 2016-04-22 at 2 56 39 pm

I'd really rather not have a placeholder, but place_holder: nil doesn't have any effect.

What's the trick to change the default minus sign to nothing?

https://github.com/bernat/best_in_place/blob/57b525e487cd6ba10467b47d8bf8907c645f6917/lib/assets/javascripts/best_in_place.js#L634-L639

// Default locale
BestInPlaceEditor.defaults.locales[''] = {
    confirmMessage: "Are you sure you want to discard your changes?",
    uninitializedForm: "The form was not properly initialized. getValue is unbound",
    placeHolder: '-'
};
duffyjp commented 8 years ago

Oh.

place_holder: false

Okay. Got it.

iwkad22