diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-30 15:08:05 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:16 -0500 |
commit | f8d23f70b9e5658b109a0180881fb272fccc28ca (patch) | |
tree | fd3477b383d9ceeed4c384f087ba88d4d9d33863 /app/lib | |
parent | b2129db547f89ec1e02bf0742cd08fe466867386 (diff) |
[UI, Accessibility] Make underlining hyperlinks optional
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/user_settings_decorator.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |