If you want this functionality in all controllers, then it should go in application.rb.
If you want it in only some controllers but not others, you could create a new controller
class AdminController< ApplicationController
Then inherit from that instead
class SomeOtherController < AdminController
You could also experiment with using modules to share code between controllers.