diff options
author | Molchanov Andrey <neodelf@gmail.com> | 2016-05-09 22:07:50 +0300 |
---|---|---|
committer | Molchanov Andrey <neodelf@gmail.com> | 2016-05-10 09:55:58 +0300 |
commit | 88f804d3a984e50e831ed466a3b8b2ab7df5ce85 (patch) | |
tree | 02a328d5547fc63bf9c1f91daf84570cf015611b /activerecord/lib/active_record/associations | |
parent | 288c01fc5f09a052918c3378a209063a44dab73e (diff) | |
download | rails-88f804d3a984e50e831ed466a3b8b2ab7df5ce85.tar.gz rails-88f804d3a984e50e831ed466a3b8b2ab7df5ce85.tar.bz2 rails-88f804d3a984e50e831ed466a3b8b2ab7df5ce85.zip |
Replacement cycle for readability
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/association_scope.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb index 48437a1c9e..15844de0bc 100644 --- a/activerecord/lib/active_record/associations/association_scope.rb +++ b/activerecord/lib/active_record/associations/association_scope.rb @@ -124,8 +124,7 @@ module ActiveRecord scope = last_chain_scope(scope, table, owner_reflection, owner, association_klass) reflection = chain_head - loop do - break unless reflection + while reflection table = reflection.alias_name unless reflection == chain_tail |