I am updating from rails 4.1.7
to 5.1.5
and ruby 2.1.2
to 2.5.3
.
I have been reading the rails upgrade guide, but I’m having an issue that I might not fully understand what is going on or have missed something somewhere.
I keep getting “ArgumentError (Before process_action callback :method_name_here has not been defined)” when it hasn’t been an issue before and
I can confirm that it was getting fired (and working) in 4.1.7
.
My setup:
class ApplicationController < ActionController::Base protect_from_forgery with: :exception
before_action :customer_check
private def customer_check # Some checks are here… end end
class OrdersController < ApplicationController skip_before_action :customer_check, :only => [:new, :submit] def new end def submit end
…code…
end
class OrderFormController < OrdersController
skip_before_action :customer_check
…code…
class OrderForm::CompanyController < OrderFormController
skip_before_action :customer_check
def update
end
…code…
end
class OrderForm::RoutingController < OrderFormController
skip_before_action :customer_check
def update
end
…code…
end
end
``
As you can see that it is all inherited from the ApplicationController, which has the method. Has something changed in ruby or rails that would prevent this from working?
I have found Rails 5, "skip_before_action :authenticate_user" in every controller throw: "ArgumentError: Before process_action callback :authenticate_user has not been defined" · Issue #138 · nsarno/knock · GitHub on github, but I don’t feel like I should have to put raise: false
on all of those calls as that method should be found.
Thank you