Answer the question
In order to leave comments, you need to log in
How to always call the same controller method for all pages?
Essence: there is a main page for which quizzes_controller is responsible. In the header, which is rendered separately from the content, the information from @categories is output using the each iterator. It happens that the content changes, i.e. controllers other than quizzes_controller, for example, results_contoller, are responsible for displaying information on it.
Question: Is it possible to make all pages pass @categories from categories_controller?
Answer the question
In order to leave comments, you need to log in
I poorly understood what it was about, but from what I understood, I think that this is the option when it is worth moving the function of interest to helpers. :)
I didn't understand much either. Maybe call before_action in application_controller?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question