Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>
profile_list_block: use AR/SQL count instead of Array#length
app/models/profile_list_block.rb | 2 +-
diff --git a/app/models/profile_list_block.rb b/app/models/profile_list_block.rb index b03ed000bea84fa237721f6660367eec14725b83..8830b9f3aab20eea263e823b81dd052b91fbe5b4 100644 --- a/app/models/profile_list_block.rb +++ b/app/models/profile_list_block.rb @@ -32,7 +32,7 @@ result.slice(0..get_limit-1) end def profile_count - profiles.length + profiles.count end # the title of the block. Probably will be overriden in subclasses.