Rails session

I was wondering if it is possible to know if the rails session has been modified?

I am having a around filter, I make changes to the session object
I then yield to the action being performed, the action might not might not change the session object. In the after block I want to figure out if the session has been altered?


I guess you have to use a before block to cache the initial value and then compare that to the final value in the after block