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 
<https://guides.rubyonrails.org/upgrading_ruby_on_rails.html>, 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


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/d3a1687b-664f-44f0-b71d-8bde4eeaea2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to