diff options
author | Mingdong Luo <mdluo@nsmss.com> | 2015-01-31 19:23:48 -0800 |
---|---|---|
committer | Mingdong Luo <mdluo@nsmss.com> | 2015-01-31 19:23:48 -0800 |
commit | 549d171a90135999e3c670f489494b7a39dd6dd7 (patch) | |
tree | 233466527b797fe3ea7c6a7a3673795cea28aebe /activerecord/lib/active_record/reflection.rb | |
parent | c840b18ac31a852d99ff760229f2c087b6961727 (diff) | |
parent | 70ac072976c8cc6f013f0df3777e54ccae3f4f8c (diff) | |
download | rails-549d171a90135999e3c670f489494b7a39dd6dd7.tar.gz rails-549d171a90135999e3c670f489494b7a39dd6dd7.tar.bz2 rails-549d171a90135999e3c670f489494b7a39dd6dd7.zip |
Merge branch 'master' into pr/18316
Conflicts:
activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 7696ef13c7..dab5a502a5 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -153,15 +153,6 @@ module ActiveRecord JoinKeys.new(foreign_key, active_record_primary_key) end - def source_macro - ActiveSupport::Deprecation.warn(<<-MSG.squish) - ActiveRecord::Base.source_macro is deprecated and will be removed - without replacement. - MSG - - macro - end - def constraints scope_chain.flatten end @@ -352,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 @@ -763,16 +751,6 @@ module ActiveRecord source_reflection.join_keys(association_klass) end - # The macro used by the source association - def source_macro - ActiveSupport::Deprecation.warn(<<-MSG.squish) - ActiveRecord::Base.source_macro is deprecated and will be removed - without replacement. - MSG - - source_reflection.source_macro - end - # A through association is nested if there would be more than one join table def nested? chain.length > 2 |