aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/through_association_scope.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/associations/through_association_scope.rb')
-rw-r--r--activerecord/lib/active_record/associations/through_association_scope.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/through_association_scope.rb b/activerecord/lib/active_record/associations/through_association_scope.rb
index 1924156e2a..6f0f698f1e 100644
--- a/activerecord/lib/active_record/associations/through_association_scope.rb
+++ b/activerecord/lib/active_record/associations/through_association_scope.rb
@@ -6,8 +6,7 @@ module ActiveRecord
def construct_scope
{ :create => construct_owner_attributes(@reflection),
- :find => { :from => construct_from,
- :conditions => construct_conditions,
+ :find => { :conditions => construct_conditions,
:joins => construct_joins,
:include => @reflection.options[:include] || @reflection.source_reflection.options[:include],
:select => construct_select,
@@ -145,7 +144,7 @@ module ActiveRecord
end
def build_sti_condition
- @reflection.through_reflection.klass.send(:type_condition)
+ @reflection.through_reflection.klass.send(:type_condition).to_sql
end
alias_method :sql_conditions, :conditions