summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-17 18:37:53 +0200
committerRémy Coutable <remy@rymai.me>2016-06-17 18:37:53 +0200
commit7c9571a3baa222b52bd44219317f169a82af1d44 (patch)
tree1ff27f42788dcc526683c28ecaf9c1eab47e55d8 /app/views
parente71ce77e39837f3e18403ceb07d27a0497b7196c (diff)
downloadgitlab-ce-7c9571a3baa222b52bd44219317f169a82af1d44.tar.gz
Address Douwe's feedbackfix-18717
- Make it more explicit that `source` must respond to `#group` and that `#group` must be present. - Indent subsequent lines of a multi-line condition. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/views')
-rw-r--r--app/views/shared/members/_access_request_buttons.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/members/_access_request_buttons.html.haml b/app/views/shared/members/_access_request_buttons.html.haml
index e0fc9f7af37..480e8ba6c85 100644
--- a/app/views/shared/members/_access_request_buttons.html.haml
+++ b/app/views/shared/members/_access_request_buttons.html.haml
@@ -1,5 +1,5 @@
- member = source.members.find_by(user_id: current_user.id)
-- group_member = source.group.members.find_by(user_id: current_user.id) if source.try(:group)
+- group_member = source.group.members.find_by(user_id: current_user.id) if source.respond_to?(:group) && source.group
- unless group_member
- if member