Skip to content
Snippets Groups Projects
Commit f8137075 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Show correct group membership in profile

parent 0b747a0f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,7 +2,7 @@ class Profiles::GroupsController < ApplicationController
layout "profile"
 
def index
@groups = current_user.authorized_groups.page(params[:page]).per(20)
@user_groups = current_user.users_groups.page(params[:page]).per(20)
end
 
def leave
Loading
Loading
Loading
Loading
@@ -11,9 +11,10 @@
.ui-box
.title
%strong Groups
(#{@groups.count})
(#{@user_groups.count})
%ul.well-list
- @groups.each do |group|
- @user_groups.each do |user_group|
- group = user_group.group
%li
.pull-right
- if can?(current_user, :manage_group, group)
Loading
Loading
@@ -28,4 +29,7 @@
= link_to group, class: 'group-name' do
= group.name
 
= paginate @groups
as #{user_group.human_access}
= paginate @user_groups
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment