From fcd2bdf1fe83a4d39a6c3af6d03d09500f93ca4d Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 14 Sep 2015 15:33:56 +0200 Subject: Migrate tables Revert some Make it work Migrate tags and taggings to --- lib/charts.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/charts.rb') diff --git a/lib/charts.rb b/lib/charts.rb index 93e81a5..2472050 100644 --- a/lib/charts.rb +++ b/lib/charts.rb @@ -16,10 +16,10 @@ module Charts def push(from, to, format) @labels << from.strftime(format) @total << project.builds. - where('? > builds.created_at AND builds.created_at > ?', to, from). + where('? > ci_builds.created_at AND ci_builds.created_at > ?', to, from). count(:all) @success << project.builds. - where('? > builds.created_at AND builds.created_at > ?', to, from). + where('? > ci_builds.created_at AND ci_builds.created_at > ?', to, from). success.count(:all) end end @@ -59,7 +59,7 @@ module Charts class BuildTime < Chart def collect - commits = project.commits.joins(:builds).where('builds.finished_at is NOT NULL AND builds.started_at is NOT NULL').last(30) + commits = project.commits.joins(:builds).where('ci_builds.finished_at is NOT NULL AND ci_builds.started_at is NOT NULL').last(30) commits.each do |commit| @labels << commit.short_sha @build_times << (commit.duration / 60) -- cgit v1.2.1