Use before_filters to set project in line with Rails 4 scaffolding