ActiveAdmin 错误 - 未定义方法“action_methods”对于“admin/admin_users”:字符串
导航到 admin_users 的 ActiveAdmin 资源时出现以下错误:
undefined method `action_methods' for "admin/admin_users":String
前几行跟踪:
activeadmin (0.3.2) lib/active_admin/resource/action_items.rb:51:in `block in add_default_action_items'
activeadmin (0.3.2) lib/active_admin/views/action_items.rb:9:in `instance_eval'
activeadmin (0.3.2) lib/active_admin/views/action_items.rb:9:in `block (2 levels) in build'
activeadmin (0.3.2) lib/active_admin/arbre/builder.rb:68:in `block in build_tag'
activeadmin (0.3.2) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
activeadmin (0.3.2) lib/active_admin/arbre/builder.rb:67:in `build_tag'
activeadmin (0.3.2) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
activeadmin (0.3.2) lib/active_admin/arbre/html/element.rb:17:in `span'
我基本上只是按照以下中概述的步骤操作: http://railscasts.com/episodes/284-active-admin?view=asciicast
Getting the following error upon navigating to the ActiveAdmin resource for admin_users:
undefined method `action_methods' for "admin/admin_users":String
First few lines of trace:
activeadmin (0.3.2) lib/active_admin/resource/action_items.rb:51:in `block in add_default_action_items'
activeadmin (0.3.2) lib/active_admin/views/action_items.rb:9:in `instance_eval'
activeadmin (0.3.2) lib/active_admin/views/action_items.rb:9:in `block (2 levels) in build'
activeadmin (0.3.2) lib/active_admin/arbre/builder.rb:68:in `block in build_tag'
activeadmin (0.3.2) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
activeadmin (0.3.2) lib/active_admin/arbre/builder.rb:67:in `build_tag'
activeadmin (0.3.2) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
activeadmin (0.3.2) lib/active_admin/arbre/html/element.rb:17:in `span'
I've basically just followed the steps outlined in: http://railscasts.com/episodes/284-active-admin?view=asciicast
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现问题了。 application_controller.rb 中有一个名为 @controller 的实例变量。吸取的教训...永远不要对变量使用保留关键字。
Found the problem. Had an instance variable named @controller in application_controller.rb. Lesson learned... never use reserved keywords for variables.