diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-19 18:50:24 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:43:59 -0500 |
commit | 21438b54bdaf3c557ec9ebbc482a2c418d8c64f8 (patch) | |
tree | e577d047af196823227e675dea52b2fc2fa842c6 /app/lib | |
parent | 8c8ad0ac0ed0d3e67f3e521068b59edd4054f1e9 (diff) |
[Feature] Add manual publishing option
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/user_settings_decorator.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 2f9cfe3ad..8106b976c 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -43,6 +43,8 @@ class UserSettingsDecorator user.settings['use_pending_items'] = use_pending_items_preference if change?('setting_use_pending_items') user.settings['trends'] = trends_preference if change?('setting_trends') user.settings['crop_images'] = crop_images_preference if change?('setting_crop_images') + + user.settings['manual_publish'] = manual_publish_preference if change?('setting_manual_publish') end def merged_notification_emails @@ -157,6 +159,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_crop_images' end + def manual_publish_preference + boolean_cast_setting 'setting_manual_publish' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |