How to check errors in files with quick view

I use rabl with rails 3.2 application, I get errors in rabl view files, but not indicating the exact error line where the error occurred. So now I want the debugging code for the line to throw an error, something like puts statement. Can someone help me, thanks in advance

+6
source share
1 answer

You should be able to use instantiated variables in the same way as with any other template.

Haml

=puts @variable.inspect 

Erb

 <%= puts @avariable.inspect %> 
+1
source

Source: https://habr.com/ru/post/952802/


All Articles