gitlabhq/gitlabhq — pull request #8102 by cirosantilli (2014-10-19 21:26:51+00:00)
Title: [WIP] Use @project on controllers, don't call method

Also memoize the method through the `unless @project` line to ensure that other methods in
ApplicationController that rely on it can call it efficiently.

This PR makes things much more efficient: before it `def project` was called as a filter, set `@project`, but many places in the controllers re-called `project`, which was not memoized, instead of using the instance.