mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Fix new ActiveRecord::Relation instance presentation for Rails>=4
This commit is contained in:
parent
2bc678bba5
commit
63961069bb
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ module AwesomePrint
|
|||
cast = :active_record_instance
|
||||
elsif object.is_a?(Class) && object.ancestors.include?(::ActiveRecord::Base)
|
||||
cast = :active_record_class
|
||||
elsif type == :activerecord_relation
|
||||
elsif type == :activerecord_relation || object.class.ancestors.include?(::ActiveRecord::Relation)
|
||||
cast = :array
|
||||
end
|
||||
cast
|
||||
|
|
Loading…
Reference in a new issue