diff options
author | Wei-Meng Lee <wlee@gitlab.com> | 2019-05-13 23:52:57 +0300 |
---|---|---|
committer | Wei-Meng Lee <wlee@gitlab.com> | 2019-05-31 15:49:27 +0300 |
commit | ddd6f804576e1e9d69db85242a8dbc687cdb35db (patch) | |
tree | 5f3ecfbb3fc6d57f9a75358d2692a6de9ebfe09a /app/models/group.rb | |
parent | f72383066d9758988706e697c26ba35efe90c564 (diff) |
Move method into group
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 25d246f64e7..cdb4e6e87f6 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -138,6 +138,10 @@ class Group < Namespace .order("ordered_groups.depth #{hierarchy_order}") end + def notification_settings_for(user, hierarchy_order: nil) + notification_settings(hierarchy_order: hierarchy_order).where(user: user) + end + def to_reference(_from = nil, full: nil) "#{self.class.reference_prefix}#{full_path}" end |