Forum: Ruby on Rails Print out session dump?

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.
2c3e9116fabc3e9f09927d1ffa8bf9e3?d=identicon&s=25 Wuher (Guest)
on 2006-05-31 22:39
(Received via mailing list)
How can I go about printing out an object in Ruby?  I'm looking for the
print_r php equivalent.  All I'm trying to do is print out session
information.  It is exactly what is shown in "Show session dump" when an
exception is caught.  Any ideas?  Thanks.
--
View this message in context:
http://www.nabble.com/Print+out+session+dump--t171...
Sent from the RubyOnRails Users forum at Nabble.com.
16b26104470ae1b64958f3caa836c193?d=identicon&s=25 Danny Burkes (dburkes)
on 2006-05-31 22:48
Wuher wrote:
> How can I go about printing out an object in Ruby?  I'm looking for the
> print_r php equivalent.  All I'm trying to do is print out session
> information.  It is exactly what is shown in "Show session dump" when an
> exception is caught.  Any ideas?  Thanks.


logger.info session.inspect

It's ugly but the information is all there.

- Danny
6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-06-01 00:12
(Received via mailing list)
On May 31, 2006, at 1:21 PM, Wuher wrote:

> Sent from the RubyOnRails Users forum at Nabble.com.
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails


<%= debug session %>

-Ezra
16b26104470ae1b64958f3caa836c193?d=identicon&s=25 Danny Burkes (dburkes)
on 2006-06-01 01:41
> <%= debug session %>

Well I'll be damned...that's what I love about these forums.  Even when
you think you know the answer, you find out there's more to learn.

Thanks!

- Danny
This topic is locked and can not be replied to.