gregbell/active_admin — Issue #880: Let's add a sortable option for the has_many formbuilder
Author: michaek
Created: 2011-12-23 19:05:35+00:00
State: open

This would add a jQuery UI sortable to the items in a has_many, with the :sortable parameter accepting the field the sortable should update. That field would need to be included in the fields for the associated model - for example:

f.has_many :images, :sortable => :sort do |i|
i.input :image
i.input :sort, :as => :hidden
end

The feature will only update the value of the hidden field, which would only be persisted to the database upon submitting the form.