summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-14 12:25:47 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-14 12:25:47 +0200
commita8b462bbfe3647574e17c483aad27281c2adc5f2 (patch)
treed64c7bb74c5b6f7b38a4e27735f87fdc07dc99bd /app
parent1c0b58a7994f2942799c5ccdbdd37a48aa034f97 (diff)
downloadgitlab-ce-a8b462bbfe3647574e17c483aad27281c2adc5f2.tar.gz
Clear up InvitesController member lookup logic.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/invites_controller.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb
index 2a98fb0b48b..3ac8654fcce 100644
--- a/app/controllers/invites_controller.rb
+++ b/app/controllers/invites_controller.rb
@@ -43,11 +43,10 @@ class InvitesController < ApplicationController
return @member if defined?(@member)
@token = params[:id]
- if member = Member.find_by_invite_token(@token)
- @member = member
- else
- render_404
- end
+
+ @member = Member.find_by_invite_token(@token)
+
+ render_404 unless @member
end
def authenticate_user!