BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4d70c479
Commit
4d70c479
authored
Jun 25, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix spec failures
parent
ae953105
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
emails_controller.rb
app/controllers/profiles/emails_controller.rb
+2
-2
user.rb
app/models/user.rb
+2
-2
No files found.
app/controllers/profiles/emails_controller.rb
View file @
4d70c479
...
...
@@ -5,7 +5,7 @@ class Profiles::EmailsController < Profiles::ApplicationController
end
def
create
@email
=
Emails
::
CreateService
.
new
(
current_user
,
current_user
,
email_params
).
execute
@email
=
Emails
::
CreateService
.
new
(
current_user
,
email_params
).
execute
if
@email
.
errors
.
blank?
NotificationService
.
new
.
new_email
(
@email
)
...
...
@@ -19,7 +19,7 @@ class Profiles::EmailsController < Profiles::ApplicationController
def
destroy
@email
=
current_user
.
emails
.
find
(
params
[
:id
])
Emails
::
DestroyService
.
new
(
current_user
,
current_user
,
email:
@email
.
email
).
execute
Emails
::
DestroyService
.
new
(
current_user
,
email:
@email
.
email
).
execute
respond_to
do
|
format
|
format
.
html
{
redirect_to
profile_emails_url
,
status:
302
}
...
...
app/models/user.rb
View file @
4d70c479
...
...
@@ -494,8 +494,8 @@ class User < ActiveRecord::Base
def
update_emails_with_primary_email
primary_email_record
=
emails
.
find_by
(
email:
email
)
if
primary_email_record
Emails
::
DestroyService
.
new
(
self
,
self
,
email:
email
).
execute
Emails
::
CreateService
.
new
(
self
,
self
,
email:
email_was
).
execute
Emails
::
DestroyService
.
new
(
self
,
email:
email
).
execute
Emails
::
CreateService
.
new
(
self
,
email:
email_was
).
execute
end
end
...
...
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