Permalink
Browse files

confirmation email template

  • Loading branch information...
1 parent b2aecdd commit f7a8094c46ff18d7b64b6668615ecb40fd604749 Zac Williams committed Dec 13, 2010
@@ -1,6 +1,9 @@
class UserMailer < ActionMailer::Base
def confirmation_instructions(user)
+
+ @user = user
+
mail(:to => user.email,
:subject => Spree::Config[:site_name] + ' ' + t("confirmation_instructions"))
end
@@ -0,0 +1,5 @@
+<p>Welcome to <%= Spree::Config[:site_name] %>!</p>
+
+<p>Please confirm your your email address by clicking on the link below:</p>
+
+<p><%= user_confirmation_url(@user.confirmation_token) %></p>
@@ -1,7 +1,7 @@
<% if @user.confirmed_at.nil? %>
<div class="flash notice">
<p><%= t("unconfirmed_account") %></p>
- <%= form_for(:user, :url => user_confirmation_path, :html => { :method => :post }) do |f| %>
+ <%= form_for(:user, :url => create_user_confirmation_path, :html => { :method => :post }) do |f| %>
<p><%= f.submit t("resend_confirmation_instructions") %></p>
<% end %>
</div>
View
@@ -3,6 +3,7 @@ en:
account_confirmation_successful: "You email address has been confirmed!"
already_confirmed: "Email address has already been confirmed."
claim_it: "Claim It!"
+ confirm_it: "Confirm It!"
instructions_sent_success: "Confirmation Instructions Sent."
invalid_token: "Invalid Confirmation Token."
order_claim_failure: "Error Claiming Order."
View
@@ -1,8 +1,8 @@
Rails.application.routes.draw do
devise_scope :user do
- post "/user_confirmation" => "user_confirmations#create", :as => :user_confirmation
- get "/user_confirmation/:confirmation_token" => "user_confirmations#show"
+ post "/user_confirmation" => "user_confirmations#create", :as => :create_user_confirmation
+ get "/user_confirmation/:confirmation_token" => "user_confirmations#show", :as => :user_confirmation
end
match 'orders/:id/claim' => 'orders#claim', :via => :put, :as => :claim_order

0 comments on commit f7a8094

Please sign in to comment.