aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-01-05 11:44:14 +0100
committerYves Senn <yves.senn@gmail.com>2015-01-05 11:44:14 +0100
commit4ed97979d14c5e92eb212b1a629da0a214084078 (patch)
treeefcef0221da350471596a63318332361e67cbaf5 /activerecord/lib/active_record/reflection.rb
parenta076256d63f64d194b8f634890527a5ed2651115 (diff)
downloadrails-4ed97979d14c5e92eb212b1a629da0a214084078.tar.gz
rails-4ed97979d14c5e92eb212b1a629da0a214084078.tar.bz2
rails-4ed97979d14c5e92eb212b1a629da0a214084078.zip
remove deprecated support to preload instance-dependent associaitons.
Addresses https://github.com/rails/rails/commit/ed56e596a0467390011bc9d56d462539776adac1#commitcomment-9145960
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r--activerecord/lib/active_record/reflection.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 66f2b6b768..dab5a502a5 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -343,13 +343,10 @@ module ActiveRecord
return unless scope
if scope.arity > 0
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
+ raise ArgumentError, <<-MSG.squish
The association scope '#{name}' is instance dependent (the scope
- block takes an argument). Preloading happens before the individual
- instances are created. This means that there is no instance being
- passed to the association scope. This will most likely result in
- broken or incorrect behavior. Joining, Preloading and eager loading
- of these associations is deprecated and will be removed in the future.
+ block takes an argument). Preloading instance dependent scopes is
+ not supported.
MSG
end
end