1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Change ActiveRecord check to be more specific

Originally the code was like this but the check was made a lot
less specific in a large code change.

dfbebd4887 (diff-e567c486212ebaee39cf4091c38a4d84L17)
This commit is contained in:
Gerard Caulfield 2016-07-22 00:29:39 +10:00
parent 3c67245bbb
commit 1a9d732dfa
No known key found for this signature in database
GPG key ID: 623B327128A9BEC3

View file

@ -15,7 +15,7 @@ module AwesomePrint
#------------------------------------------------------------------------------
def cast_with_active_record(object, type)
cast = cast_without_active_record(object, type)
return cast if !defined?(::ActiveRecord)
return cast if !defined?(::ActiveRecord::Base)
if object.is_a?(::ActiveRecord::Base)
cast = :active_record_instance