ArgumentError (Before process_action callback has not been defined)

50 views
Skip to first unread message

AJ

unread,
Jan 8, 2019, 10:36:02 AM1/8/19
to Ruby on Rails: Talk
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...
end

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

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 https://github.com/nsarno/knock/issues/138 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


Reply all
Reply to author
Forward
0 new messages