controller variables in layout

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.