ezran
December 24, 2005, 2:03am
1
Hi there,
I am newbie both in Ruby and in Rails. My experience is mostly PHP.
In PHP, there is a var_dump($mixed) function that dumps the object
$mixed to std_out. This is helpful to see the curent value of a
variable, of if it is an object, everything that is in the object.
Is there an equivalent methods in RoR?
Thanks,
Ezra
ezran
December 24, 2005, 3:37am
2
On Dec 23, 2005, at 5:03 PM, Ezra Nugroho wrote:
Thanks,
Ezra
–
Hey Ezra-
If you want to get a look at your variables in any of your .rhtml
views you can do so like this:
<%= debug(@post ) %>
replace @post with whatever you want to dump. This will pretty print
your data so you can see what’s going on.
Cheers-
-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
[email protected]
509-577-7732
ezran
December 24, 2005, 9:58am
3
Hey Ezra-
If you want to get a look at your variables in any of your .rhtml
views you can do so like this:
<%= debug(@post ) %>
replace @post with whatever you want to dump. This will pretty print
your data so you can see what’s going on.
Cheers-
-Ezra Z.
Thanks Ezra! I know someone in this list is better than Ezra (this one
is me of course…).