mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
let AR::Relation pretty_printed like an Array
This commit is contained in:
parent
983bf6d456
commit
1c49b61d96
1 changed files with 4 additions and 0 deletions
|
@ -496,6 +496,10 @@ module ActiveRecord
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue