Remove html tag from the text part of email

Instead of calling single function emitting HTML tags in the HTML part
of email, directly output HTML tags or raw text.
This commit is contained in:
Haunui Saint-sevin 2019-06-04 00:49:20 +00:00
parent e5a74e0b7e
commit 3de4d313a3
3 changed files with 6 additions and 9 deletions

View file

@ -57,12 +57,6 @@ module EmailsHelper
pluralize(valid_length, unit)
end
def reset_token_expire_message
link_tag = link_to('request a new one', new_user_password_url(user_email: @user.email))
"This link is valid for #{password_reset_token_valid_time}. " \
"After it expires, you can #{link_tag}."
end
def header_logo
if current_appearance&.header_logo?
image_tag(

View file

@ -13,4 +13,5 @@
%p
= link_to "Click here to set your password", edit_password_url(@user, reset_password_token: @token)
%p
= raw reset_token_expire_message
This link is valid for #{password_reset_token_valid_time}.
After it expires, you can #{link_to("request a new one", new_user_password_url(user_email: @user.email))}.

View file

@ -4,7 +4,9 @@ The Administrator created an account for you. Now you are a member of the compan
login.................. <%= @user.email %>
<% if @user.created_by_id %>
<%= link_to "Click here to set your password", edit_password_url(@user, :reset_password_token => @token) %>
Click here to set your password:
<%= edit_password_url(@user, :reset_password_token => @token) %>
<%= reset_token_expire_message %>
This link is valid for <%= password_reset_token_valid_time %>. After it expires, you can request a new one here:
<%= new_user_password_url(user_email: @user.email) %>
<% end %>