Commit fc51bf32 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Found a workaround for that weird SQL error:

Without that, Rails would complain:

> bind message supplies 5 parameters, but prepared statement "a4" requires 4

However without this workaround it would still work in Rails console,
so I still think this is a Rails bug somewhere.
parent b08912db
......@@ -27,7 +27,9 @@ module Ci
end
scope :specific_for, ->(project) do
where(locked: false).where.not(id: project.runners).specific
# TODO: That `to_sql` is needed to workaround a weird Rails bug.
# Without that, placeholders would miss one and couldn't match.
where(locked: false).where.not(id: project.runners.to_sql).specific
end
validate :tag_constraints
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment