Shouldn't this be in a filter on application_controller?