1
0
Fork 0
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:
Sergey Ponomarev 2014-07-16 23:31:30 +04:00 committed by James Cox
parent 2bc678bba5
commit 63961069bb

View file

@ -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