activate emails
This commit is contained in:
@ -14,9 +14,6 @@ class OauthsController < ApplicationController
|
||||
else
|
||||
begin
|
||||
@user = create_from(provider)
|
||||
# NOTE: this is the place to add '@user.activate!' if you
|
||||
# are using user_activation submodule
|
||||
|
||||
reset_session # protect from session fixation attack
|
||||
auto_login(@user)
|
||||
redirect_to root_path, notice: "Logged in from #{provider.titleize}!"
|
||||
|
@ -1,2 +0,0 @@
|
||||
module OauthsHelper
|
||||
end
|
@ -1,6 +1,23 @@
|
||||
class AccountMailer < ApplicationMailer
|
||||
def activation_needed
|
||||
@blarg = "This was blarg"
|
||||
mail(to: 'markamoser+test@gmail.com', subject: 'Activate me please!')
|
||||
# Subject can be set in your I18n file at config/locales/en.yml
|
||||
# with the following lookup:
|
||||
#
|
||||
# en.account_mailer.activation_needed_email.subject
|
||||
#
|
||||
def activation_needed_email(user)
|
||||
@greeting = "Hi"
|
||||
@user = user
|
||||
mail to: Person.admins.map(&:email).join(', ')
|
||||
end
|
||||
|
||||
# Subject can be set in your I18n file at config/locales/en.yml
|
||||
# with the following lookup:
|
||||
#
|
||||
# en.account_mailer.activation_success_email.subject
|
||||
#
|
||||
def activation_success_email(user)
|
||||
@greeting = "Hi"
|
||||
@user = user
|
||||
mail to: user.email
|
||||
end
|
||||
end
|
||||
|
@ -1,4 +0,0 @@
|
||||
!!!
|
||||
%h3 Activate me please
|
||||
|
||||
%p and then: #{@blarg}
|
@ -0,0 +1,4 @@
|
||||
%h1= "AccountMailer#" + @action.to_s
|
||||
|
||||
%p
|
||||
= @greeting + ", find me in app/views/account_mailer/activation_needed_email.html.haml"
|
@ -0,0 +1,3 @@
|
||||
AccountMailer#activation_needed_email
|
||||
|
||||
= @greeting + ", find me in app/views/account_mailer/activation_needed_email.text.haml"
|
@ -0,0 +1,4 @@
|
||||
%h1= "AccountMailer#" + @action.to_s
|
||||
|
||||
%p
|
||||
= @greeting + ", find me in app/views/account_mailer/activation_success_email.html.haml"
|
@ -0,0 +1,3 @@
|
||||
AccountMailer#activation_success_email
|
||||
|
||||
= @greeting + ", find me in app/views/account_mailer/activation_success_email.text.haml"
|
@ -1,3 +1,4 @@
|
||||
!!!
|
||||
%hmtl
|
||||
%body
|
||||
= yield
|
||||
= yield
|
||||
|
Reference in New Issue
Block a user