]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/users_controller.rb
Replace collection partial with single item in changeset comments feed
[rails.git] / app / controllers / users_controller.rb
index b017c33b95b39b44b859335befda16c23a9e72ec..fbf49ecbe6835cb1ba99ce52193d96c2f835a8e3 100644 (file)
@@ -203,8 +203,8 @@ class UsersController < ApplicationController
             session[:referer] = referer
             successful_login(current_user)
           else
             session[:referer] = referer
             successful_login(current_user)
           else
-            session[:token] = current_user.tokens.create.token
-            UserMailer.signup_confirm(current_user, current_user.tokens.create(:referer => referer)).deliver_later
+            session[:pending_user] = current_user.id
+            UserMailer.signup_confirm(current_user, current_user.generate_token_for(:new_user), referer).deliver_later
             redirect_to :controller => :confirmations, :action => :confirm, :display_name => current_user.display_name
           end
         else
             redirect_to :controller => :confirmations, :action => :confirm, :display_name => current_user.display_name
           end
         else