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:
parent
3c67245bbb
commit
1a9d732dfa
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue