aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-06-22 22:57:34 +0200
committerYves Senn <yves.senn@gmail.com>2014-06-22 22:57:34 +0200
commitf0f017466da99a238d71e8f7232b223c5442f2ab (patch)
tree656891561f75e1622563693709903fe5abfe2519 /activerecord/lib/active_record
parentb663869940e642b06c903eba2eb2b362585ed194 (diff)
parent31911a409c2cfe4c6fef550d913487163b3b938e (diff)
downloadrails-f0f017466da99a238d71e8f7232b223c5442f2ab.tar.gz
rails-f0f017466da99a238d71e8f7232b223c5442f2ab.tar.bz2
rails-f0f017466da99a238d71e8f7232b223c5442f2ab.zip
Merge pull request #15848 from sgrif/sg-remove-deprecation
Remove old deprecation warning
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/querying.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/querying.rb b/activerecord/lib/active_record/querying.rb
index 39817703cd..a9ddd9141f 100644
--- a/activerecord/lib/active_record/querying.rb
+++ b/activerecord/lib/active_record/querying.rb
@@ -37,14 +37,7 @@ module ActiveRecord
# Post.find_by_sql ["SELECT body FROM comments WHERE author = :user_id OR approved_by = :user_id", { :user_id => user_id }]
def find_by_sql(sql, binds = [])
result_set = connection.select_all(sanitize_sql(sql), "#{name} Load", binds)
- column_types = {}
-
- if result_set.respond_to? :column_types
- column_types = result_set.column_types.except(*columns_hash.keys)
- else
- ActiveSupport::Deprecation.warn "the object returned from `select_all` must respond to `column_types`"
- end
-
+ column_types = result_set.column_types.except(*columns_hash.keys)
result_set.map { |record| instantiate(record, column_types) }
end