我有模型Comment试图用 activeadmin 管理这个模型:
rails g active_admin:resource 评论
活动管理员创建的文件:app\admin\comments.rb带有:
ActiveAdmin.register Comment, :as => 'AllComments' 做 menu :parent => "Campaigns", :priority => 55 结尾
来自rake:routes:
admin_all_comments GET /admin/all_comments(.:format) admin/all_comments#index
POST /admin/all_comments(.:format) admin/all_comments#create
new_admin_all_comment GET /admin/all_comments/new(.:format) admin/all_comments#new
edit_admin_all_comment GET /admin/all_comments/:id/edit(.:format) admin/all_comments#edit
admin_all_comment GET /admin/all_comments/:id(.:format) admin/all_comments#show
PUT /admin/all_comments/:id(.:format) admin/all_comments#update
删除 /admin/all_comments/:id(.:format) admin/all_comments#destroy
admin_comments GET /admin/comments(.:format) admin/comments#index
问题:访问时admin\all_comments我发现评论加载了很长时间。
笔记:
comment模型中只有 24 条记录- 评论模型是由 Ryan Bates (http://railscasts.com/episodes/154-polymorphic-association) 描述的多态关联
- 我在模型上使用
kaminari设置 {paginates_per 10}comment,但是从我的角度来看,这根本不应该影响 activeadmin - 控制台没有输出,它定义没有错误,所以这就是它不断加载页面的原因
任何有关此问题的帮助将不胜感激
我的堆栈:
ruby-1.9.3-p125, rails-3.2.8, WEBrick 1.3.1,mac os lion