简体   繁体   中英

How to add custom action to the rails_admin

In my case I need to approve records from the rails_admin list panel. What I would like to do is to make a link with :remote => true for each record in the list page and using the pointed in the link action approve selected record.

How to do this easily without hacking rails_admin?

截至几周前,RailsAdmin现在支持自定义操作

There are several ways to add custom actions, but you cannot do this:

link with :remote => true

One hacky way is to make the pretty_value to show a link with remote: true . That will be shown on /admin/model/:id page, not on the list.

There is no support for custom actions yet: https://github.com/sferik/rails_admin/issues/166 . ActiveAdmin (http://activeadmin.info/) seems to be much more customizable (with a totally other approch), I will replace rails_admin with this gem...

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