Browse files

use drop rather than calculate the array length

  • Loading branch information...
1 parent ac70ec6 commit d440fa07dc9b20880d0f22071319d8a9babe4e6b @tenderlove tenderlove committed May 21, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/join_dependency.rb
View
2 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

0 comments on commit d440fa0

Please sign in to comment.