Forum: Ruby on Rails what is print_r in rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
334ae822566107a2ea2b7a7cb88bd1d6?d=identicon&s=25 Brutyn Nick (Guest)
on 2005-12-21 17:02
(Received via mailing list)
hey,

i know u have in php print_r or echo, so that the browser print the
variable on
top of page, no matter what

what is this in rails?? put doesnt seem to work

Thanks
Nick
39b36b2be47228f8619d61ea7a607a25?d=identicon&s=25 Matthew Beale (Guest)
on 2005-12-21 17:05
(Received via mailing list)
On Wed, 2005-12-21 at 15:56 +0000, Brutyn Nick wrote:
> hey,
>
> i know u have in php print_r or echo, so that the browser print the variable on
> top of page, no matter what
>
> what is this in rails?? put doesnt seem to work
>

You can use breakpointing, or given @foo:

<%= @foo.inspect %>

--

-Matthew Beale
mixonic@synitech.com :: 607 227 0871
Resume and Portfolio @ http://madhatted.com
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (Guest)
on 2005-12-21 17:08
(Received via mailing list)
i think you are looking for debug

http://rails.rubyonrails.com/classes/ActionView/He...
This topic is locked and can not be replied to.