# Restful-authentication (activation\_code and user.reload)

**URL:** <https://www.ruby-forum.com/t/restful-authentication-activation-code-and-user-reload/156431>\
**Category:** Rails\
**Created:** [December 27, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/restful-authentication-activation-code-and-user-reload/156431 "2008-12-27T13:17:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noocx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ccd318/32.png) [@noocx](https://www.ruby-forum.com/u/noocx)\
**Post date:** [December 27, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/restful-authentication-activation-code-and-user-reload/156431/1 "2008-12-27T13:17:48Z")

</div>

Hello,

I solved one of my problems with restful-authentication plugin: the  
sent activation\_code was different than the one in the db.

I found the solution in the readme:  
[http://github.com/technoweenie/restful-authentication/tree/master/README.textile](http://github.com/technoweenie/restful-authentication/tree/master/README.textile)

“Pay attention, may be this is not an issue for everybody, but if you  
should have problems, that the sent activation\_code does match with  
that in the database stored, reload your user object before sending  
its data through email something like:”

I put the user.reload into the observer and now it works, but i don’t  
understand why.

Can you tell me?

Thanks,  
noocx
