Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从运行数据库查询中获取数据,User.first但由于字段太多,很难读取信息。我尝试使用pp User.first,但它并没有让任何东西更容易阅读。RoR 是否有内置的东西,我不必安装可以美化它的 gem?另外,如果可能的话,我不想每次都写一个 each 语句来分解它。
User.first
pp User.first
如果您不喜欢 pp 的输出,我不确定您还有什么其他选择。如果您可以克服不想要宝石的情况,Hirb 可以很好地做到这一点……
https://github.com/cldwalker/hirb