diff options
Diffstat (limited to 'app/services/projects/batch_count_service.rb')
-rw-r--r-- | app/services/projects/batch_count_service.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/projects/batch_count_service.rb b/app/services/projects/batch_count_service.rb index a79fdb62d69..178ebc5a143 100644 --- a/app/services/projects/batch_count_service.rb +++ b/app/services/projects/batch_count_service.rb @@ -1,3 +1,6 @@ +# Service class for getting and caching the number of elements of several projects +# Warning: do not user this service with a really large set of projects +# because the service use maps to retrieve the project ids. module Projects class BatchCountService def initialize(projects) @@ -14,8 +17,6 @@ module Projects end def project_ids - return @projects if @projects.is_a?(ActiveRecord::Relation) - @projects.map(&:id) end |