Commit 1481d1cfe08d875424aa59e2f3db7843cc56ab97
Exists in
master
and in
4 other branches
Merge branch 'count_user_owned_projects' of /home/git/repositories/gitlab/gitlabhq
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/models/user.rb
| @@ -235,7 +235,7 @@ class User < ActiveRecord::Base | @@ -235,7 +235,7 @@ class User < ActiveRecord::Base | ||
| 235 | end | 235 | end |
| 236 | 236 | ||
| 237 | def can_create_project? | 237 | def can_create_project? |
| 238 | - projects_limit > personal_projects.count | 238 | + projects_limit > owned_projects.count |
| 239 | end | 239 | end |
| 240 | 240 | ||
| 241 | def can_create_group? | 241 | def can_create_group? |
app/views/profiles/show.html.haml
| @@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
| 77 | %legend | 77 | %legend |
| 78 | Personal projects: | 78 | Personal projects: |
| 79 | %small.pull-right | 79 | %small.pull-right |
| 80 | - %span= current_user.personal_projects.count | 80 | + %span= current_user.owned_projects.count |
| 81 | of | 81 | of |
| 82 | %span= current_user.projects_limit | 82 | %span= current_user.projects_limit |
| 83 | .padded | 83 | .padded |