This might be repeated question. But I can't display the object
.
I'm new to ruby, tried to debug like var_dump
and print_r
then die
in php
Here is my code.
@brand_id = Brand.maximum("brand_id")
I tried the following method
1 puts YAML::dump(@brand_id)
2 logger.debug { @brand_id.inspect }
Can anyone help me resolve it, pls?
abort YAML::dump(@brand_id)
which will stop the execution and output in an error page.puts variable.inspect
worked well.