where('? > builds.created_at AND builds.created_at > ?',to,from).
where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?",to,from).
count(:all)
@success<<project.builds.
where('? > builds.created_at AND builds.created_at > ?',to,from).
where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?",to,from).
success.count(:all)
end
end
...
...
@@ -60,7 +60,7 @@ module Ci
classBuildTime<Chart
defcollect
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::Build.table_name}.finished_at is NOT NULL AND #{Ci::Build.table_name}.started_at is NOT NULL").last(30)