# Request profiling - login and authenticity token

**URL:** <https://www.ruby-forum.com/t/request-profiling-login-and-authenticity-token/147941>\
**Category:** Rails\
**Created:** [September 7, 2008, 11:05am UTC](https://www.ruby-forum.com/t/request-profiling-login-and-authenticity-token/147941 "2008-09-07T11:05:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drogomir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/5fc32e/32.png) [@Drogomir](https://www.ruby-forum.com/u/Drogomir)\
**Post date:** [September 7, 2008, 11:05am UTC](https://www.ruby-forum.com/t/request-profiling-login-and-authenticity-token/147941/1 "2008-09-07T11:05:06Z")

</div>

I was doing Request profiling like Ryan B. showed on railscasts  
([#98 Request Profiling - RailsCasts](http://railscasts.com/episodes/98-request-profiling)) and I wanted to  
profile some update action.

I’ve prepared a script: [http://pastie.org/267554](http://pastie.org/267554)

After running request profiler I saw InvalidAuthenticityToken error. I  
disabled it and then realized that user is not authorized while  
profiling. So I’ve skipped login\_required and authorization. But…  
current\_user data is needed in some of the actions.

I definetely have to provide valid user. Auth token isn’t important,  
but still, disabling it on while profiling isn’t the best solution

How to handle it the rails way?
