[Ruby] How to use binding.pry for view files

less than 1 minute read

How to use ####binding.pry in a view file

I knew that when I used binding.pry in a view file, I had only to write [- binding.pry] below the line whose operation I want to check, but for some reason it was output as a syntax error, and that alone caused binding. I couldn’t do a .pry. I wrote it.

How to use

It was very simple and I could do binding.pry by matching the indentation to the line below the view file.

view file


# Describe the indent on the line below.