There are two main ways to re-use code between controllers.
You can create a subclass of ApplicationController
which has the common code in and then your controllers that want to share the code inherit from the new controller class. (Or just add the code to ApplicationController
itself if it needs to be shared by all controllers.)
Alternatively you can create your own modules (this is all the helpers are in essence) and include them into the controllers that you want to use the code in.
As helpers are just modules you could include a helper in your controller but helpers are more for the view layer than the controller so it is rarely the place to share code between controllers.