We used the best_in_place Editor, but only for custom views, and not for general ones.
https://github.com/bernat/best_in_place
gem "best_in_place" bundle rails g best_in_place:setup
Add the best_in_place script to /app/assets/javascripts/active_admin.js :
//= require best_in_place $(document).ready(function() { /* Activating Best In Place */ jQuery(".best_in_place").best_in_place() });
in your user view, in part, you can have something like
.panel %h3 Your Resource Table .panel_contents .attributes_table %table %tbody %tr %th Name %td= best_in_place resource, :name, :type => :input, :path => [:admin, resource] ... ...
Since ActiveAdmin already configured your RESTful actions, and BestInPlace uses RESTful PUT to update too, everything should work automatically :)
You can also use something like this, but I have not tested this yet.
index do column(:name) { |i| best_in_place i, :name, :type => :input, :path => [:admin, i] } end
Severin ulrich
source share