Commit 7c7510301f6c9742fa529d67323a6e579e1bb921
1 parent
f2258e83
Exists in
master
and in
29 other branches
ActionItem629: Debian etch (Ruby 1.8.6) porting
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2426 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
app/models/environment_statistics_block.rb
@@ -9,9 +9,9 @@ class EnvironmentStatisticsBlock < Block | @@ -9,9 +9,9 @@ class EnvironmentStatisticsBlock < Block | ||
9 | end | 9 | end |
10 | 10 | ||
11 | def content | 11 | def content |
12 | - users = owner.people.find_all_by_public_profile(true).count | ||
13 | - enterprises = owner.enterprises.find_all_by_public_profile(true).count | ||
14 | - communities = owner.communities.find_all_by_public_profile(true).count | 12 | + users = owner.people.count(:conditions => { :public_profile => true }) |
13 | + enterprises = owner.enterprises.count(:conditions => { :public_profile => true }) | ||
14 | + communities = owner.communities.count(:conditions => { :public_profile => true }) | ||
15 | 15 | ||
16 | info = [ | 16 | info = [ |
17 | n_('One user', '%{num} users', users) % { :num => users }, | 17 | n_('One user', '%{num} users', users) % { :num => users }, |