# Restful\_auth - current\_user in models

**URL:** <https://www.ruby-forum.com/t/restful-auth-current-user-in-models/117556>\
**Category:** Rails\
**Created:** [October 18, 2007, 2:36am UTC](https://www.ruby-forum.com/t/restful-auth-current-user-in-models/117556 "2007-10-18T02:36:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ea666f/32.png) [@bob](https://www.ruby-forum.com/u/bob)\
**Post date:** [October 18, 2007, 2:36am UTC](https://www.ruby-forum.com/t/restful-auth-current-user-in-models/117556/1 "2007-10-18T02:36:03Z")

</div>

Is it possible to reference the current\_user object that  
restful\_authentication creates when you login, in a model?

I’m trying to move some Find methods into my models, but any reference  
to current\_user returns “method not found” error… I tried  
User.current\_user, but that also fails.

Is it just not possible to have sessions references in your model?

---

<div class="post-metadata">

**Author:** ![bob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ea666f/32.png) [@bob](https://www.ruby-forum.com/u/bob)\
**Post date:** [October 18, 2007, 3:46am UTC](https://www.ruby-forum.com/t/restful-auth-current-user-in-models/117556/2 "2007-10-18T03:46:13Z")

</div>

U need to have include restful auth statement in ur app.rb. Then u  
will be able to acess current user I’d

Sent from my iPhone
