0
我想为admin添加全局的before_filter。在我config/initializers/active_admin.rb
我有Activeadmin在过滤器使用前给出运行时错误
config.before_filter :do_something_awesome
和application_controller.rb
def do_something_awesome
# raise
end
当我尝试启动我的服务器就停止与以下错误。
Exiting
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:492:in `load_missing_constant': Circular dependency detected while autoloading constant Student (RuntimeError)
而且还可以我用before_action
而不是before_filter
由于Rails 4.2不赞成before_filter
?
谢谢,关于那个错误的任何事情? – user464
你能告诉我routes.rb文件吗? –
查看此链接以更好地了解错误,http://neethack.com/2015/04/rails-circular-dependency/ –