about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-07-14 16:41:02 +0200
committerGitHub <noreply@github.com>2017-07-14 16:41:02 +0200
commitc42092ba7ad1cbf78ca8463b6525ec2b7efbdd92 (patch)
treecd2905803ff282f6a72fc449f24ede4312aff813 /app/lib
parent999170d898fbe98e634f827580695c0615370f75 (diff)
Add option to opt out of search engines on public profile/status pages (#4199)
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/user_settings_decorator.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb
index e0e92b19d..c5da18029 100644
--- a/app/lib/user_settings_decorator.rb
+++ b/app/lib/user_settings_decorator.rb
@@ -23,6 +23,7 @@ class UserSettingsDecorator
     user.settings['delete_modal'] = delete_modal_preference
     user.settings['auto_play_gif'] = auto_play_gif_preference
     user.settings['system_font_ui'] = system_font_ui_preference
+    user.settings['noindex'] = noindex_preference
   end
 
   def merged_notification_emails
@@ -57,6 +58,10 @@ class UserSettingsDecorator
     boolean_cast_setting 'setting_auto_play_gif'
   end
 
+  def noindex_preference
+    boolean_cast_setting 'setting_noindex'
+  end
+
   def boolean_cast_setting(key)
     settings[key] == '1'
   end