Permalink
Browse files

Merge pull request #15848 from sgrif/sg-remove-deprecation

Remove old deprecation warning
  • Loading branch information...
2 parents b663869 + 31911a4 commit f0f017466da99a238d71e8f7232b223c5442f2ab @senny senny committed Jun 22, 2014
Showing with 1 addition and 8 deletions.
  1. +1 −8 activerecord/lib/active_record/querying.rb
@@ -37,14 +37,7 @@ module Querying
# 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

0 comments on commit f0f0174

Please sign in to comment.