# Detecting a New Session

**URL:** <https://www.ruby-forum.com/t/detecting-a-new-session/193765>\
**Category:** Rails\
**Created:** [August 24, 2010, 2:20am UTC](https://www.ruby-forum.com/t/detecting-a-new-session/193765 "2010-08-24T02:20:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 24, 2010, 2:20am UTC](https://www.ruby-forum.com/t/detecting-a-new-session/193765/1 "2010-08-24T02:20:24Z")

</div>

Is there a way to determine if the current request is the first  
request of the Rails session? I could create a session variable to  
accomplish this, but it would be nice if you could do something like  
request.new\_session?

Does that make sense?

Thanks,  
Tom
