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.
我将 rabl 与 rails 3.2 应用程序一起使用,我在 rabl 视图文件中遇到错误,但它没有指出发生错误的确切错误行。所以现在我想要调试视图代码的行会导致错误,比如 puts 语句。
您应该能够以与任何其他模板相同的方式使用实例化变量。
哈姆
=puts @variable.inspect
erb
<%= puts @avariable.inspect %>