Commit 84e4cfc6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Prevent mailer error when note with code highlight

parent abea7125
......@@ -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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment