I have come across a problem when I am trying to extend
ApplicationController with a .rb file containing a module inside /lib
The problem is, let’s say if I want to add a method called
authenticate inside ApplicationController using
ApplicationController.send(:include), I would do it as:
This would work only if I put the require statement at the end of
application.rb, I want to know if there is any chance it would work
too if I want to put the require statement at the top?