How to get nice formatting in the Rails console

前端 未结 12 1465
一生所求
一生所求 2020-12-12 10:50

I want to get something like this to look nice:

>> ProductColor.all
=> [#

        
12条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-12 11:06

    Hi you can also try this in your script/console if

    >> y ProductColor.all
    

    not working for you.

    Try this:

    >> require 'yaml'
    
    >> YAML::ENGINE.yamler = 'syck'
    

    then

    >> y ProductColor.all
    

提交回复
热议问题