diff options
author | Felipe Artur <fcardozo@gitlab.com> | 2018-11-05 12:30:14 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-11-05 12:30:14 +0000 |
commit | b4d005eb7b4a51e8cf6b11e6aea3d0c264e4abfd (patch) | |
tree | 2d073cb044761fce0a08ca375b195e12836c985b /app/models/user_preference.rb | |
parent | 90473e064eac21be283e751005e0c7abbdbf9089 (diff) | |
download | gitlab-ce-b4d005eb7b4a51e8cf6b11e6aea3d0c264e4abfd.tar.gz |
Add 'only history' option to notes filter
Diffstat (limited to 'app/models/user_preference.rb')
-rw-r--r-- | app/models/user_preference.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 6cd91abc261..32d0407800f 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -4,7 +4,7 @@ class UserPreference < ActiveRecord::Base # We could use enums, but Rails 4 doesn't support multiple # enum options with same name for multiple fields, also it creates # extra methods that aren't really needed here. - NOTES_FILTERS = { all_notes: 0, only_comments: 1 }.freeze + NOTES_FILTERS = { all_notes: 0, only_comments: 1, only_activity: 2 }.freeze belongs_to :user @@ -14,7 +14,8 @@ class UserPreference < ActiveRecord::Base def notes_filters { s_('Notes|Show all activity') => NOTES_FILTERS[:all_notes], - s_('Notes|Show comments only') => NOTES_FILTERS[:only_comments] + s_('Notes|Show comments only') => NOTES_FILTERS[:only_comments], + s_('Notes|Show history only') => NOTES_FILTERS[:only_activity] } end end |