diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-04-16 15:03:37 +0300 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-04-20 16:39:37 +0300 |
commit | 5a4ebfb47af40de6cfe29fe59dae82f8c244e5e3 (patch) | |
tree | f87ac47a9d14849659a8a40a53576080593b0670 /app/controllers/groups/group_members_controller.rb | |
parent | 76aade28e25d1f6e8924b35ed9bd365c8889987f (diff) |
Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'app/controllers/groups/group_members_controller.rb')
-rw-r--r-- | app/controllers/groups/group_members_controller.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/groups/group_members_controller.rb b/app/controllers/groups/group_members_controller.rb index 265cf4f0f4a..5648a652e8e 100644 --- a/app/controllers/groups/group_members_controller.rb +++ b/app/controllers/groups/group_members_controller.rb @@ -1,10 +1,10 @@ class Groups::GroupMembersController < Groups::ApplicationController - skip_before_filter :authenticate_user!, only: [:index] - before_filter :group + skip_before_action :authenticate_user!, only: [:index] + before_action :group # Authorize - before_filter :authorize_read_group! - before_filter :authorize_admin_group!, except: [:index, :leave] + before_action :authorize_read_group! + before_action :authorize_admin_group!, except: [:index, :leave] layout :determine_layout @@ -49,7 +49,7 @@ class Groups::GroupMembersController < Groups::ApplicationController def resend_invite redirect_path = group_group_members_path(@group) - + @group_member = @group.group_members.find(params[:id]) if @group_member.invite? @@ -63,7 +63,7 @@ class Groups::GroupMembersController < Groups::ApplicationController def leave @group_member = @group.group_members.where(user_id: current_user.id).first - + if can?(current_user, :destroy_group_member, @group_member) @group_member.destroy redirect_to(dashboard_groups_path, notice: "You left #{group.name} group.") |