Permalink
Browse files

Call to_sql method on ActiveRecord::Relation instance not it's relation

attribute.'
  • Loading branch information...
1 parent 74ed123 commit 0abba2813be52cc8f8ff2544f8a3b18b5083be53 @miloops miloops committed Aug 18, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
@@ -1733,7 +1733,7 @@ def construct_finder_arel(options = {}, scope = scope(:find))
end
def construct_finder_sql(options, scope = scope(:find))
- construct_finder_arel(options, scope).relation.to_sql
+ construct_finder_arel(options, scope).to_sql
end
def construct_join(joins, scope)

0 comments on commit 0abba28

Please sign in to comment.