简体   繁体   中英

How can i insert custom form in active admin index column?

I want to insert some forms that can edit some model of field.

However, when I wrote the code below and pressed the button, I got the following error message

RuntimeError in Admin::MyController#batch_action

How can i insert custom form which can edit some field of model to active admin index column?

column 'memo' do |sup|
   form url: admin_path do |f|
       f.input :title
       f.button :submit, type: :submit
   end
end

This worked for me:

column 'memo' do |sup|
  active_admin_form_for sup, url: admin_sup_path(sup) do |f|
    f.inputs do 
      f.input :title, label: false
    end

     f.action :submit
  end
end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM