How to inspect errors in rable view files
Asked Answered
N

1

8

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.

Nadean answered 30/8, 2013 at 5:56 Comment(0)
E
1

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 %>
Estuarine answered 23/2, 2014 at 17:35 Comment(1)
So one would think. In rabl templates you can leave out the ruby escaping - just put a line with puts "blah".Coadjutant

© 2022 - 2024 — McMap. All rights reserved.