Usually you do not call controllers from assistants. That is: if you mean a method that collects data and then displays a view (any other method that needs to be called should probably not be in the controller). This is definitely bad practice and breaks MVC .
Nevertheless, it is quite possible to make controller methods available in views, for example, the current_user method can serve as an example.
To make the controller method available in views as a helper method, simply do
private def current_user
Such a method is best defined in the private section, or it may be available as an action (if you use the template in your routing).
nathanvda
source share