简体   繁体   中英

Customizing Active Admin Comments

Active Admin has those handle comments that go automatically into your admin screens by typing "active_admin_comments"

What I want to do is to add some fields to their comments like a 'status' field. What's the best approach for doing this?

Thx

If you want to change defaults, probably the only way is to monkeypatch build_comment_form method of Comments class from active_admin_comments.rb

You can also make your own comments component by subclassing ActiveAdmin::Comments:: Views::Comments , overwriting build_comment_form method and using

builder_method :my_active_admin_comments_for

Just see mentioned active_admin_comments.rb for reference.

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