# Restful\_authentication issue

**URL:** <https://www.ruby-forum.com/t/restful-authentication-issue/144224>\
**Category:** Rails\
**Created:** [July 27, 2008, 12:37am UTC](https://www.ruby-forum.com/t/restful-authentication-issue/144224 "2008-07-27T00:37:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stickstone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Post date:** [July 27, 2008, 12:37am UTC](https://www.ruby-forum.com/t/restful-authentication-issue/144224/1 "2008-07-27T00:37:09Z")

</div>

I cloned from github, can the generator with the --include-activation  
option

Now when I go to create a new user account the following method in  
app/models/user\_observer.rb fails:

def after\_save(user)

```
UserMailer.deliver_activation(user) if user.recently_activated?

```

end

The model method ‘.recently\_acticated?’ does not exist in the generated  
user model. After searching around I can see that older versions of this  
plug-in included this method but I have to assume it was removed for a  
reason. So I would like to try to get it first working the way the  
author intended before I start modifying. Any ideas?

---

<div class="post-metadata">

**Author:** ![stickstone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Post date:** [July 27, 2008, 2:30pm UTC](https://www.ruby-forum.com/t/restful-authentication-issue/144224/2 "2008-07-27T14:30:03Z")

</div>

I catched bug then activation code was generated twice, and user was  
not able to activate his account because sent activation code was  
rewritten.

The reason was that both aasm\_roles.rb and stateful\_roles.rb were  
loaded. After deleting one of them all works fine

On 27 ÉÀÌ, 05:37, Brian C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
