---
title: "用restful_authentication生成邮件激活模块,存在一个小Bug"
author: "fireflyman"
date: "2011-01-01T01:29:20Z"
tags: []
categories: ["编程语言"]
slug: "restful-authentication-bug"
draft: false
lastmod: "2011-01-01T01:48:19Z"
id: 857249
url: "https://fireflyman.iteye.com/blog/857249"
---

这个问题相信很多人都遇到,而且也解决了.我只是记录而已..
用restful_authentication插件的命令

```Ruby
ruby script/generate authenticated user sessions --include-activation
```

后,会存在一个小bug,即新用户注册后不激活就登录了系统。

通过注释掉app/controllers/users_controller.rb中create下的

```Ruby
self.current_user = @user
```


可修复问题.