-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve "I follow the ... link in the email" step (resolves #110)
- Loading branch information
Showing
9 changed files
with
87 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
class EmailsController < ApplicationController | ||
|
||
def do_nothing | ||
render :nothing => true | ||
render nothing: true | ||
end | ||
|
||
def send_email | ||
if Rails.version >= "3" | ||
Mailer.email.deliver | ||
deliver :email | ||
render nothing: true | ||
end | ||
|
||
def send_html_email_with_links | ||
deliver :html_email_with_links | ||
render nothing: true | ||
end | ||
|
||
def send_text_email_with_links | ||
deliver :text_email_with_links | ||
render nothing: true | ||
end | ||
|
||
private | ||
|
||
def deliver(method_name) | ||
if Rails.version >= '3' | ||
Mailer.public_send(method_name).deliver | ||
else | ||
Mailer.deliver_email | ||
Mailer.public_send("deliver_#{method_name}") | ||
end | ||
|
||
render :nothing => true | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
!!! | ||
%html(lang="en" xmlns="http://www.w3.org/1999/xhtml") | ||
%body | ||
%img(src="https://www.example.com/image.png") | ||
%a(href="https://www.example.com/static_pages/link_target") Click me | ||
%a(href="https://www.example.com/static_pages/second_link_target") Other link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Hello! | ||
|
||
First link: https://www.example.com/static_pages/link_target | ||
Second link: https://www.example.com/static_pages/second_link_target | ||
|
||
Bye! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters