Skip to content

Commit

Permalink
[SCOPES] HaveScopeMatcher should compare sql instead of real object […
Browse files Browse the repository at this point in the history
…fixed issue #27]
  • Loading branch information
webgago authored and hosh committed Aug 28, 2011
1 parent 826bed5 commit f294cf1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def is_scope?

@scope_object.class == ::ActiveRecord::Relation && @scope_object.arel
end

def options_match?
@options.empty? || @scope_object.arel == arel(subject_class, @options.except(:with))
@options.empty? || @scope_object.arel.to_sql == arel(subject_class, @options.except(:with)).to_sql
end

def interpolation_options
Expand Down

0 comments on commit f294cf1

Please sign in to comment.