diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-30 09:46:02 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-30 09:46:02 +0300 |
commit | 84e4cfc6bbfa7251dc8e2b88ca4c507b98cadc61 (patch) | |
tree | 37c0b6be9622e6e0a2b3ec8ee3ae9a038123c87c /app/helpers | |
parent | abea7125266c3bd4199f28fff03914796867831c (diff) | |
download | gitlab-ce-84e4cfc6bbfa7251dc8e2b88ca4c507b98cadc61.tar.gz |
Prevent mailer error when note with code highlight
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 65d03fe0ccd..4c0bbf813bd 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -124,6 +124,9 @@ module ApplicationHelper end def user_color_scheme_class + # in case we dont have current_user (ex. in mailer) + return 1 unless defined?(current_user) + case current_user.color_scheme_id when 1 then 'white' when 2 then 'black' |