Count owned projects, not just personal

This commit is contained in:
Marin Jankovski 2013-02-18 13:15:35 +01:00
parent 020078663e
commit 1734611181
2 changed files with 2 additions and 2 deletions

View file

@ -235,7 +235,7 @@ class User < ActiveRecord::Base
end end
def can_create_project? def can_create_project?
projects_limit > personal_projects.count projects_limit > owned_projects.count
end end
def can_create_group? def can_create_group?

View file

@ -77,7 +77,7 @@
%legend %legend
Personal projects: Personal projects:
%small.pull-right %small.pull-right
%span= current_user.personal_projects.count %span= current_user.owned_projects.count
of of
%span= current_user.projects_limit %span= current_user.projects_limit
.padded .padded