I have a config/hirb.yml
which looks a bit like this
:output:
BlogEntry:
:options:
:fields:
- id
- title
- url
User:
:options:
:fields:
- id
- first_name
- last_name
In the rails console, Hirb will properly format BlogEntry.all
according to the hirb.yml specification, but will not do that for User.all
.
Why? And how do I fix it?
I found the answer here:
https://github.com/cldwalker/hirb/issues/40
Thanks to @cldwalker for answering the exact same question there. (I've modified the below quote so it syncs to my question.)
The documentation that I didn't find at first, which is handy for knowing how to use
hirb.yml
: http://tagaholic.me/hirb/doc/classes/Hirb/Formatter.html