Hi, complete noob here!
Despite following the Railscast authlogic tutorial step by step, I'm running into an error when I try to register a new user.
NoMethodError in UsersController#create
Undefined method `persistence_token_changed?' for #<User:0x23d1c54>
My Users controller code is as follows:
class UsersController < ApplicationController
def new
@user = User.new
end
def create
@user = User.new(params[:user])
if @user.save
flash[:notice] = "Successfully created user."
redirect_to root_url
else
render :action => 'new'
end
end
def edit
@user = current_user
end
def update
@user = current_user
if @user.update_attributes(params[:user])
flash[:notice] = "Successfully updated user."
redirect_to root_url
else
render :action => 'edit'
end
end
end
Any ideas? If you need to see anymore code, let me know. Stumped :/