【问题标题】:Upgrade to Rails 3.1.1 and Authlogic升级到 Rails 3.1.1 和 Authlogic
【发布时间】:2011-12-21 21:59:24
【问题描述】:

刚刚将我的 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
  ...

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

【问题讨论】:

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


【解决方案1】:

在application.rb中加入这一行

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-07
    • 2011-01-09
    相关资源
    最近更新 更多