Topic: Using code multiple times in multiple controllers.
Ive got a piece of code, which is retrieving data from activerecord. And i use this piece of code muttiple times at multiple controllers / views. What is the best way to use this as a fuction and call it from every controller.
I tried already put in application controller but no result.
It have to return some more date than only one return value.
So whats the best way to do this ?