aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-09-03 18:46:01 +0200
committerYves Senn <yves.senn@gmail.com>2014-09-04 07:52:08 +0200
commit98318750126b2d1cf6569e7ebfce5d2aee469dcd (patch)
treedb7992b8771e2c2462e6ec87db5dbde7ef87f615 /activerecord
parent4dfe140ef3fbed34e6ae8af3b32402630a4690a1 (diff)
downloadrails-98318750126b2d1cf6569e7ebfce5d2aee469dcd.tar.gz
rails-98318750126b2d1cf6569e7ebfce5d2aee469dcd.tar.bz2
rails-98318750126b2d1cf6569e7ebfce5d2aee469dcd.zip
get rid of shadowing warning when running tests AR and railtie tests.
Warning looked like this: ``` /Users/senny/Projects/rails/activerecord/lib/active_record/associations/association_scope.rb:142: warning: shadowing outer local variable - reflection ```
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/association_scope.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb
index 26fed22b4c..b58c902bfc 100644
--- a/activerecord/lib/active_record/associations/association_scope.rb
+++ b/activerecord/lib/active_record/associations/association_scope.rb
@@ -135,9 +135,9 @@ module ActiveRecord
tables = construct_tables(chain, assoc_klass, refl, tracker)
- reflection = chain.last
+ a_reflection = chain.last
table = tables.last
- scope = last_chain_scope(scope, table, reflection, owner, tracker, assoc_klass)
+ scope = last_chain_scope(scope, table, a_reflection, owner, tracker, assoc_klass)
chain.each_with_index do |reflection, i|
table, foreign_table = tables.shift, tables.first