diff options
Diffstat (limited to 'lib/charts.rb')
-rw-r--r-- | lib/charts.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/charts.rb b/lib/charts.rb index 851518f..93e81a5 100644 --- a/lib/charts.rb +++ b/lib/charts.rb @@ -15,8 +15,12 @@ module Charts def push(from, to, format) @labels << from.strftime(format) - @total << project.builds.where("? > builds.created_at AND builds.created_at > ?", to, from).count - @success << project.builds.where("? > builds.created_at AND builds.created_at > ?", to, from).success.count + @total << project.builds. + where('? > builds.created_at AND builds.created_at > ?', to, from). + count(:all) + @success << project.builds. + where('? > builds.created_at AND builds.created_at > ?', to, from). + success.count(:all) end end |