Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
31775ad8
Commit
31775ad8
authored
Apr 03, 2019
by
Wei-Meng Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move group_notification_email outside conditional
parent
11fb4d42
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
app/mailers/notify.rb
app/mailers/notify.rb
+1
-2
No files found.
app/mailers/notify.rb
View file @
31775ad8
...
@@ -79,10 +79,9 @@ class Notify < BaseMailer
...
@@ -79,10 +79,9 @@ class Notify < BaseMailer
# Returns a String containing the User's email address.
# Returns a String containing the User's email address.
def
recipient
(
recipient_id
,
notification_group
=
nil
)
def
recipient
(
recipient_id
,
notification_group
=
nil
)
@current_user
=
User
.
find
(
recipient_id
)
@current_user
=
User
.
find
(
recipient_id
)
if
notification_group
group_notification_email
=
nil
group_notification_email
=
nil
if
notification_group
# Get notification group's and ancestors' notification settings
# Get notification group's and ancestors' notification settings
group_ids
=
notification_group
.
self_and_ancestors_ids
group_ids
=
notification_group
.
self_and_ancestors_ids
notification_settings
=
notification_group
.
notification_settings
.
where
(
user:
@current_user
)
# rubocop: disable CodeReuse/ActiveRecord
notification_settings
=
notification_group
.
notification_settings
.
where
(
user:
@current_user
)
# rubocop: disable CodeReuse/ActiveRecord
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment