Probably in a before_filter. If you really want the data available everywhere, put the before_filter in application.rb. If only for a given controller, then implement it for that class only.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
controller variables in layout | 0 | 74 | June 8, 2007 | |
Instance variables in application layout | 0 | 92 | June 8, 2008 | |
How do you make a variable available to all views? | 0 | 135 | October 12, 2007 | |
How do you make a variable available to all views? | 0 | 93 | October 12, 2007 | |
Accessing controller specific variables application-wide | 1 | 176 | July 15, 2008 |