summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-02-23 17:19:28 +0000
committerRobert Speicher <robert@gitlab.com>2017-02-23 17:19:28 +0000
commit170fef0bd34a853bc2499cc7335705f73bc98edb (patch)
treef7af5116b41b7d697f9ac783bc647aba0d2902ab /app/models/user.rb
parent6a39888344a2478db022fdf8b5e41fd7625d83ab (diff)
parentade5e0b1ba04047c72cb0aff3d635a2cdaaab43c (diff)
downloadgitlab-ce-170fef0bd34a853bc2499cc7335705f73bc98edb.tar.gz
Merge branch 'dm-meer-blauw-op-straat' into 'master'
Enable (and disable) more RuboCops See merge request !9432
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index f614eb66e1f..fada0e567f0 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -104,7 +104,7 @@ class User < ActiveRecord::Base
#
# Note: devise :validatable above adds validations for :email and :password
validates :name, presence: true
- validates_confirmation_of :email
+ validates :email, confirmation: true
validates :notification_email, presence: true
validates :notification_email, email: true, if: ->(user) { user.notification_email != user.email }
validates :public_email, presence: true, uniqueness: true, email: true, allow_blank: true
@@ -580,8 +580,8 @@ class User < ActiveRecord::Base
if project.repository.branch_exists?(event.branch_name)
merge_requests = MergeRequest.where("created_at >= ?", event.created_at).
- where(source_project_id: project.id,
- source_branch: event.branch_name)
+ where(source_project_id: project.id,
+ source_branch: event.branch_name)
merge_requests.empty?
end
end