Rails 5 undefined方法`before_filter'在包括。 Mobylette

时间:2018-02-21 23:41:36

标签: passenger ruby-on-rails-5

运行rails时出现以下错误 RoR 5.1.5乘客独立

  

ActionController :: RoutingError(未定义的方法' before_filter' for   ApplicationController:Class你的意思? before_action):
  app / controllers / application_controller.rb:4:in' include'   应用程序/控制器/ application_controller.rb:4:在   `'   app / controllers / application_controller.rb:1:in''   app / controllers / welcome_controller.rb:1:in''   ^ CExitingStopping Web服务器......

application_controller.rb

class ApplicationController < ActionController::Base

before_action :require_login
include Mobylette::RespondToMobileRequests
private
    def not_authenticated
      redirect_to login_path, alert: "Please login first"
    end
end

1 个答案:

答案 0 :(得分:0)

fixed mobylette load error

此拉取请求修复了错误,但尚未撤消。

相关问题