In PHP I could echo data to the web browser to debug.
eg. echo print_r($array)
How do I do that in RoR? I tried with puts with no luck.
Is there a way?
In PHP I could echo data to the web browser to debug.
eg. echo print_r($array)
How do I do that in RoR? I tried with puts with no luck.
Is there a way?
You could try using:
<%= debug(@array) %>
in the template file or use something like:
logger.info @array.inspect
in your controller. This will print the contents of array into the server development log.