awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.07k stars 454 forks source link

AP showing empty array for foreign_keys that are strings #355

Open LizPrescott opened 5 years ago

LizPrescott commented 5 years ago

We have a pretty weird set-up wherein we share a database with a legacy coldfusion app. (I know.) Coldfusion can't deal with arrays in the way that rails represents relationships. So in some cases, we have foreign keys that are strings, rather than arrays. We can still see the data when we print it in the console normally, but when we try to do so with awesome_print, it appears as an empty array.

Expected behavior: awesome_print shows data even when it is of an unexpected type.

Current behavior: When a foreign key (model_id) is a string or list of strings, awesome_print shows them as an empty array.