diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-10 16:26:03 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-14 13:08:10 +0300 |
commit | 453340d4496ce0500985d6432c32e8d31be350a7 (patch) | |
tree | 93a4cd16b256c0cd92437d044cae0b736d6ee4ac /app/controllers/groups/group_members_controller.rb | |
parent | 87dd3f215f8c087d85cde7ac880c5480fd501303 (diff) |
Let membership invitations be resent.
Diffstat (limited to 'app/controllers/groups/group_members_controller.rb')
-rw-r--r-- | app/controllers/groups/group_members_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/groups/group_members_controller.rb b/app/controllers/groups/group_members_controller.rb index f8aa4b0bbd5..1a4b13b9d73 100644 --- a/app/controllers/groups/group_members_controller.rb +++ b/app/controllers/groups/group_members_controller.rb @@ -47,6 +47,17 @@ class Groups::GroupMembersController < Groups::ApplicationController end end + def resend_invite + @group_member = @group.group_members.find(params[:id]) + if @group_member.invite? + @group_member.resend_invite + + redirect_to group_group_members_path(@group), notice: 'Invite was successfully resent.' + else + redirect_to group_group_members_path(@group), alert: 'The invite has already been accepted.' + end + end + def leave @group_member = @group.group_members.where(user_id: current_user.id).first |