aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
diff options
context:
space:
mode:
authorMelanie Gilman <melanie@thoughtbot.com>2014-10-31 16:02:07 -0400
committerMelanie Gilman <melanie@thoughtbot.com>2014-10-31 20:46:42 -0400
commit08579e4078454c6058f1289b58bf5bfa26661376 (patch)
tree41b2958554408ee559d9bcbefdf0a867b172ef77 /activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
parent45e8a4b6c9b0294c2fd7af1d6ddbde9c728321a9 (diff)
downloadrails-08579e4078454c6058f1289b58bf5bfa26661376.tar.gz
rails-08579e4078454c6058f1289b58bf5bfa26661376.tar.bz2
rails-08579e4078454c6058f1289b58bf5bfa26661376.zip
Remove redundant substitute index when constructing bind values
We end up re-ordering them either way when we construct the Arel AST (in order to deal with rewhere, etc), so we shouldn't bother giving it a number in the first place beforehand.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
index 89a7257d77..cf379ab210 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
@@ -156,7 +156,7 @@ module ActiveRecord
end
end
- def substitute_at(column, index)
+ def substitute_at(column, index = 0)
Arel::Nodes::BindParam.new "$#{index + 1}"
end