aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/association_scope.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb
index 6a0c8e8545..56a7df0944 100644
--- a/activerecord/lib/active_record/associations/association_scope.rb
+++ b/activerecord/lib/active_record/associations/association_scope.rb
@@ -79,10 +79,9 @@ module ActiveRecord
conditions = self.conditions[i]
if reflection == chain.last
- column = column_for(table.table_name, key.to_s)
+ column = column_for(table.table_name, key.to_s)
bind_val = bind(scope, column, owner[foreign_key])
- scope = scope.where(table[key].eq(bind_val))
- #scope = scope.where(table[key].eq(owner[foreign_key]))
+ scope = scope.where(table[key].eq(bind_val))
if reflection.type
scope = scope.where(table[reflection.type].eq(owner.class.base_class.name))