From f8d23f70b9e5658b109a0180881fb272fccc28ca Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Thu, 30 Jul 2020 15:08:05 -0500 Subject: [UI, Accessibility] Make underlining hyperlinks optional --- app/lib/user_settings_decorator.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/lib/user_settings_decorator.rb') diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index cd84d42e8..0d6d150fa 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -46,6 +46,7 @@ class UserSettingsDecorator user.settings['manual_publish'] = manual_publish_preference if change?('setting_manual_publish') user.settings['style_dashed_nest'] = style_dashed_nest_preference if change?('setting_style_dashed_nest') + user.settings['style_underline_a'] = style_underline_a_preference if change?('setting_style_underline_a') end def merged_notification_emails @@ -168,6 +169,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_style_dashed_nest' end + def style_underline_a_preference + boolean_cast_setting 'setting_style_underline_a' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end -- cgit