ame*_*ior 3 ruby-on-rails activeadmin
当您第一次在 rails 应用程序上安装 activeadmin 时,/admin 仪表板中有一个名为“Comments”的选项卡。
我很惊讶地看到这一点,因为我的数据库中没有这样的表。
这究竟是为了什么?文档说
默认情况下,Active Admin 包括对资源的评论。有时,这是不希望的。
有人可以详细说明“对资源的评论”是什么意思
AA 提供了为每个资源添加评论的可能性。像has_many :comments,但仅在 AA 面板中可用。
我通常禁用评论,但这取决于 - 有时它们很有用。
有一些设置config/active_admin.rb:
# You can completely disable comments:
config.comments = true
#
# You can disable the menu item for the comments index page:
config.show_comments_in_menu = false # if set to false you won't see the tab Comments
# You can change the name under which comments are registered:
# config.comments_registration_name = 'AdminComment'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1107 次 |
| 最近记录: |