From e3a33a66cbdbdddd43f7e2743071a70c6cd2a84f Mon Sep 17 00:00:00 2001 From: Skud Date: Wed, 20 Mar 2013 14:08:33 +1100 Subject: [PATCH] add more verbiage to confirmation email --- .../confirmation_instructions.html.haml | 38 +++++++++++++++++-- config/environments/development.rb | 9 +++-- config/locales/devise.en.yml | 2 +- .../mailer/confirmation_instructions_spec.rb | 4 ++ 4 files changed, 46 insertions(+), 7 deletions(-) diff --git a/app/views/devise/mailer/confirmation_instructions.html.haml b/app/views/devise/mailer/confirmation_instructions.html.haml index 18689db65..8e10475a1 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.haml +++ b/app/views/devise/mailer/confirmation_instructions.html.haml @@ -1,9 +1,41 @@ +- site_name = Growstuff::Application.config.site_name %p - Welcome - = @resource.email + Welcome, + = @resource.login_name ! -%p You can confirm your account email through the link below: +%p + Your account on #{site_name} has been created. You just need to confirm + your email address through the link below: %p = link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) + +%p + Once you're confirmed, you can sign in with your login name + (#{@resource.login_name}) or email address (#{@resource.email}), + and the password you provided when you signed up. Note that your + login name and password are case sensitive. + +%p + We're excited to have you as a member, and hope you'll enjoy + what #{site_name} has to offer. Take a look around the site, + =link_to 'plant some things', url_for(:controller => '/crops', :only_path => false) + , and feel free to drop in on the + =link_to 'forums', url_for(:controller => '/forums', :only_path => false) + if you have any questions or feedback. + +%p + We'd also appreciate it if you'd read our + =link_to 'Community Guidelines', url_for(:controller => '/policy', :action => 'community', :only_path => false) + , and make sure you follow them. We want #{site_name} to be a + friendly, welcoming environment for everyone, and we hope you'll + help us keep it that way. + +%p + Looking forward to seeing you! + +%p + The #{site_name} team. + %br/ + =link_to root_url, root_url diff --git a/config/environments/development.rb b/config/environments/development.rb index a2b56bfe9..7dd35bd30 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -40,10 +40,13 @@ Growstuff::Application.configure do config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { - :address => "localhost", - :port => 25, - :domain => "growstuff.org" + :port => '587', + :address => 'smtp.mandrillapp.com', + :user_name => ENV['MANDRILL_USERNAME'], + :password => ENV['MANDRILL_APIKEY'], + :authentication => :login } + config.action_mailer.delivery_method = :smtp Growstuff::Application.configure do config.site_name = "Growstuff (dev)" diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 69cc7892c..fada677b5 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -56,7 +56,7 @@ en: failure: 'Could not authenticate you from %{kind} because "%{reason}".' mailer: confirmation_instructions: - subject: 'Confirmation instructions' + subject: 'Welcome to Growstuff. Please confirm your account.' reset_password_instructions: subject: 'Reset password instructions' unlock_instructions: diff --git a/spec/views/devise/mailer/confirmation_instructions_spec.rb b/spec/views/devise/mailer/confirmation_instructions_spec.rb index ec50a6635..3a0921ae7 100644 --- a/spec/views/devise/mailer/confirmation_instructions_spec.rb +++ b/spec/views/devise/mailer/confirmation_instructions_spec.rb @@ -11,5 +11,9 @@ describe 'devise/mailer/confirmation_instructions.html.haml', :type => "view" do it 'should have a confirmation link' do rendered.should contain 'Confirm my account' end + + it 'should have a link to the homepage' do + rendered.should contain root_url + end end end