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

editing an item in a jsonb column #613

Open Adeering opened 5 years ago

Adeering commented 5 years ago

Im trying to use this to edit fields inside a jsonb column...not even sure where to start on setting up the form I have this so far:

<%= best_in_place @character, 
    :data, url: user_character_path(current_user, @character), 
    as: :input, activator: "#exp-field",
    inner_class: 'form-control' %>

But this displays as object and not sure what to put to make it reference an individual item inside the jsonb column