aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-01-13 23:42:07 +0000
committerJon Leighton <j@jonathanleighton.com>2012-01-16 21:17:17 +0000
commitd13627d532f23b248a9141511c16abdf5746a486 (patch)
treeb307474e4ba22771acaedf9cba0a237e2219aad4 /activerecord/lib/active_record/relation.rb
parent247d274cabae827766c1c5b9deb34fb34548fc5e (diff)
downloadrails-d13627d532f23b248a9141511c16abdf5746a486.tar.gz
rails-d13627d532f23b248a9141511c16abdf5746a486.tar.bz2
rails-d13627d532f23b248a9141511c16abdf5746a486.zip
Revert "Deprecate implicit eager loading. Closes #950."
This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9.
Diffstat (limited to 'activerecord/lib/active_record/relation.rb')
-rw-r--r--activerecord/lib/active_record/relation.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index bf1de4ba9d..3d6478c918 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
require 'active_support/core_ext/object/blank'
-require 'active_support/deprecation'
module ActiveRecord
# = Active Record Relation
@@ -522,18 +521,7 @@ module ActiveRecord
# always convert table names to downcase as in Oracle quoted table names are in uppercase
joined_tables = joined_tables.flatten.compact.map { |t| t.downcase }.uniq
- referenced_tables = (tables_in_string(to_sql) - joined_tables)
- if referenced_tables.any?
- ActiveSupport::Deprecation.warn(
- "Your query appears to reference tables (#{referenced_tables.join(', ')}) that are not " \
- "explicitly joined. This implicit joining is deprecated, so you must explicitly " \
- "reference the tables. For example, instead of Author.includes(:posts).where(\"posts.name = 'foo'\"), " \
- "you should write Author.eager_load(:posts).where(\"posts.name = 'foo'\")."
- )
- true
- else
- false
- end
+ (tables_in_string(to_sql) - joined_tables).any?
end
def tables_in_string(string)