How to inspect errors in rable view files

849 Views Asked by At

I am using rabl with rails 3.2 application, I am getting errors in rabl view files but it's not pointing exact error line where error occured. So now I want debug view code for the line causes error, something like puts statement.

1

There are 1 best solutions below

1
On

You should be able to use the instanciated variables in the same way you would with any other template.

haml

=puts @variable.inspect

erb

<%= puts @avariable.inspect %>