1. script/generate authenticated user --include-activation creates Rails 1.2.3 style migration.
So, I changed it to:
class CreateUsers < ActiveRecord::Migration
create_table :users, :force => true do |t|
t.string :login, :email, :remember_token
t.string :crypted_password, :limit => 40
t.string :salt, :limit => 40
t.string :activation_code, :limit => 40
t.datetime :remember_token_expires_at, :activated_at
2. The routes.rb looks like:
ActionController::Routing::Routes.draw do |map|
map.connect '', :controller => 'home', :action => 'index'
map.with_options :controller => "users" do |page|
page.signup "/signup", :action => "new"
page.activate "/activate/:activation_code", :action => "activate"
# Install the default routes as the lowest priority.
I had to define named route for signup because if I use new_user method in the application.rhtml, I kept getting error.
I don't know how to define the route in a RESTful way for activation. So I have named route for it.
3. In the form:
<% form_for @user do |f| -%>
<% end -%>
That's it. I am able to signup and activate using Rails 2.0. Of course I had to rename the .rhtml files to .html.erb. Now the Textmate shortcuts are broken, since it recogizes only rhtml files.