end
def lost_password
- if params[:user][:email]
+ if params[:user] and params[:user][:email]
user = User.find_by_email(params['user']['email'])
if user
user.token = User.make_token
else
flash[:notice] = "Couldn't find that email address, sorry."
end
+ else
+ render :action => 'lost_password'
end
end