From d440fa07dc9b20880d0f22071319d8a9babe4e6b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 21 May 2013 14:19:28 -0700 Subject: [PATCH] use drop rather than calculate the array length --- activerecord/lib/active_record/associations/join_dependency.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index 5b2f2d1902..b73466d77b 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -48,7 +48,7 @@ def graft(*associations) end def join_associations - join_parts.last(join_parts.length - 1) + join_parts.drop 1 end def join_base -- GitLab