Posts [ 3 ]

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.