Skip to content

Commit

Permalink
let AR::Relation pretty_printed like an Array
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Jan 20, 2012
1 parent 983bf6d commit 1c49b61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions activerecord/lib/active_record/relation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,10 @@ def inspect
to_a.inspect
end

def pretty_print(q)
q.pp(self.to_a)
end

def with_default_scope #:nodoc:
if default_scoped? && default_scope = klass.send(:build_default_scope)
default_scope = default_scope.merge(self)
Expand Down

0 comments on commit 1c49b61

Please sign in to comment.