Reputation: 59
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
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