将 Authlogic 与 Rails 3.2.9 一起使用时出现路由错误 [英] Routing Error when used Authlogic with Rails 3.2.9

查看:60
本文介绍了将 Authlogic 与 Rails 3.2.9 一起使用时出现路由错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过参考 https://github.com/jonathandean/authlogic_example.我已经正确配置了一切.我正在使用 Rails 3.2.9 和 ruby​​ 1.8.7.当我使用 localhost:3000

I have configured authlogic gem for user management needs by referring https://github.com/jonathandean/authlogic_example. I have configured everything correctly. I am using Rails 3.2.9 and ruby 1.8.7. I am getting the following error when I took 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 :)-

推荐答案

我解决了问题.

答案是,在 Rails 3 中,ActionController 中的 filter_parameter_logging 已弃用且无效,因此删除该行并设置 'config.filter_parameters'config/application.rb 中,就像这样:

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:

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

问题已解决.

这篇关于将 Authlogic 与 Rails 3.2.9 一起使用时出现路由错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆