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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
ratnakar
  • 352
  • 1
  • 11

1 Answers1

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 %>
lsaffie
  • 1,764
  • 1
  • 17
  • 22
  • So one would think. In rabl templates you can leave out the ruby escaping - just put a line with puts "blah". – JosephK Nov 11 '20 at 04:48