Reputation: 502
I am getting the following error when running rails s RoR 5.1.5 passenger standalone
ActionController::RoutingError (undefined method 'before_filter' for ApplicationController:Class Did you mean? before_action):
app/controllers/application_controller.rb:4:in 'include' app/controllers/application_controller.rb:4:in `' app/controllers/application_controller.rb:1:in '' app/controllers/welcome_controller.rb:1:in '' ^CExitingStopping web server...
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
Upvotes: 0
Views: 1375