1class ApplicationController < ActionController::Base 2 protect_from_forgery 3 before_filter :load_categories 4 5 def load_categories 6 @categories = Category.all 7 end 8end