简体   繁体   English

将Authlogic与Rails 3.2.9结合使用时出现路由错误

[英]Routing Error when used Authlogic with Rails 3.2.9

I have configured authlogic gem for user management needs by referring https://github.com/jonathandean/authlogic_example . 我已经通过参考https://github.com/jonathandean/authlogic_example为用户管理需求配置了authlogic gem。 I have configured everything correctly. 我已经正确配置了所有内容。 I am using Rails 3.2.9 and ruby 1.8.7. 我正在使用Rails 3.2.9和ruby 1.8.7。 I am getting the following error when I took localhost:3000 使用localhost:3000时出现以下错误

Routing Error

undefined method `filter_parameter_logging' for ApplicationController:Class

Try running rake routes for more information on available routes. 

Please help to resolve this. 请帮助解决此问题。 Thanks for any help :)- 谢谢你的帮助 :)-

I got the problem resolved. 我解决了问题。

The answer is, in Rails 3, filter_parameter_logging in ActionController is deprecated and has no effect, so remove that line and set 'config.filter_parameters' in config/application.rb instead, like this: 答案是,在Rails 3中,不建议使用ActionController filter_parameter_logging ,并且不起作用,因此请删除该行并在config/application.rb设置'config.filter_parameters' ,如下所示:

config.filter_parameters += [:password, :password_confirmation]

Problem resolved. 问题已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM