I thought
class ApplicationController < ActionController::Base
include Foo
is to add a "mixin" -- so that all methods in the Foo module are treated as methods of the ApplicationController.
But now I see code that is
include Bar
class ApplicationController < ActionController::Base
include Foo
So why is it outside of ApplicationController
? How is that different from the more common use of putting it inside of ApplicationController
?
include Bar
like this is a pernicious error - it'll changeApplicationController
the way you want it to, but also change every other object in the application.