lolthai
lolthai

Reputation: 59

How Do I Find Which Session Variables are Storing Data in Rails2?

I am working with some session data in a Rails site that was created before my time. One of the session variables is not working and I'd like to see what variables exist in my session. Is there a way to get key/value pairs for my session variables and then print them out in the log?

Upvotes: 0

Views: 297

Answers (1)

Tim
Tim

Reputation: 2891

Assuming the default log level of info:

Rails.logger.info(session.inspect)

If that doesn't work try:

Rails.logger.error(session.inspect)

Upvotes: 1

Related Questions