嗨,我尝试在 rails 5 应用程序中实现 forest_admin gem
当我使用此命令生成安装时
rails g forest_liana:install <ENVIRONMENT SECRET>
日志是 alias_method': undefined method current_user' for class
ApplicationController' (NameError)
我的应用控制器
class ApplicationController < ActionController::Base
skip_before_action :verify_authenticity_token
before_action :session_expirada, unless: :devise_controller?
before_action :set_attr_to_current_user, unless: :devise_controller?
layout :layout_by_resource
alias_method :devise_current_user, :current_user
include RedirectFromEmail
# Pundi Authorization filtros
include Pundit
#after_action :verify_authorized, unless: :devise_controller? , #except: :index
#to catch message error Pundit
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
end
发生了什么事?