aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-10-09 15:15:02 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-10-09 15:15:02 -0700
commit92f95bbb33346cc6a8e7e07e51696ad10e1a6fc7 (patch)
tree675d90bbc4361665a0f721fd6a219a77239fe16b
parentc6c4869612cfc365e69588965d266ed93f8aa05d (diff)
downloadrails-92f95bbb33346cc6a8e7e07e51696ad10e1a6fc7.tar.gz
rails-92f95bbb33346cc6a8e7e07e51696ad10e1a6fc7.tar.bz2
rails-92f95bbb33346cc6a8e7e07e51696ad10e1a6fc7.zip
speed up match?
-rw-r--r--activerecord/lib/active_record/associations/join_dependency/join_association.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
index 6dd0e04d4d..fe915c7730 100644
--- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb
+++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
@@ -34,6 +34,7 @@ module ActiveRecord
alias :alias_suffix :parent_table_name
def match?(other)
+ return true if self == other
super && reflection == other.reflection
end