]> git.openstreetmap.org Git - rails.git/blobdiff - app/mailers/user_mailer.rb
Use rails tokens for signup confirmations
[rails.git] / app / mailers / user_mailer.rb
index 4e15a296a552a32b86ae7227a883483f34bc8100..92c64b4d6d20b70f9d00c2301289e90fbb869063 100644 (file)
@@ -10,11 +10,12 @@ class UserMailer < ApplicationMailer
   before_action :set_shared_template_vars
   before_action :attach_project_logo
 
-  def signup_confirm(user, token)
+  def signup_confirm(user, token, referer = nil)
     with_recipient_locale user do
       @url = url_for(:controller => "confirmations", :action => "confirm",
                      :display_name => user.display_name,
-                     :confirm_string => token.token)
+                     :confirm_string => token,
+                     :referer => referer)
 
       mail :to => user.email,
            :subject => t(".subject")