Perf: don't load preferences for the anonymous user.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9917 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-07-05 13:05:11 +00:00
parent a1f17b982c
commit bd927eea88
1 changed files with 4 additions and 0 deletions

View File

@ -659,6 +659,10 @@ class AnonymousUser < User
def time_zone; nil end def time_zone; nil end
def rss_key; nil end def rss_key; nil end
def pref
UserPreference.new(:user => self)
end
# Anonymous user can not be destroyed # Anonymous user can not be destroyed
def destroy def destroy
false false