升级到Rails 3.1.1和Authlogic

时间:2011-11-04 10:31:04

标签: ruby-on-rails ruby-on-rails-3

刚刚将我的rails应用程序升级到Rails 3.1.1并且出现以下错误:

Routing Error
undefined method `filter_parameter_logging' for ApplicationController:Class

application_controller.rb:

class ApplicationController < ActionController::Base
  protect_from_forgery
  helper :all
  helper_method :current_user_session, :current_user
  filter_parameter_logging :password, :password_confirmation
  ...

你对此有任何想法吗? 谢谢!

1 个答案:

答案 0 :(得分:0)

在application.rb

中添加此行
config.filter_parameters += [:password, :password_confirmation]

并从application_controller中删除filter_parameter_logging,因为它在Rails 3中不起作用