aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-02-22 22:33:25 +1030
committerMatthew Draper <matthew@trebex.net>2016-02-22 22:33:25 +1030
commitc901fad42cb49ad5ac847b1159e38fdfe12ab76a (patch)
tree5031220894e2121f45fe7a134ee11b20a66a6e91 /activerecord/lib
parent3591a00ea60b46793b0ccf031948ef0ca0802c23 (diff)
parentbabf5d1d2d08ab1e2be7d404f433f2789b416fe9 (diff)
downloadrails-c901fad42cb49ad5ac847b1159e38fdfe12ab76a.tar.gz
rails-c901fad42cb49ad5ac847b1159e38fdfe12ab76a.tar.bz2
rails-c901fad42cb49ad5ac847b1159e38fdfe12ab76a.zip
Merge pull request #22748 from Azzurrio/master
Fix NoMethodError preparable for Arel::Visitors::PostgreSQL
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
index bb5119d64e..aa5ae15285 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -30,7 +30,7 @@ module ActiveRecord
def select_all(arel, name = nil, binds = [], preparable: nil)
arel, binds = binds_from_relation arel, binds
sql = to_sql(arel, binds)
- if arel.is_a?(String) && preparable.nil?
+ if !prepared_statements || (arel.is_a?(String) && preparable.nil?)
preparable = false
else
preparable = visitor.preparable