-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refatora corpo do e-mail de InvitationMailer
- Loading branch information
1 parent
f0fff71
commit d2ccc5c
Showing
6 changed files
with
19 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
class InvitationsMailer < ApplicationMailer | ||
def received_invitation | ||
profile = Profile.find(params[:profile_id]) | ||
project_title = params[:project_title] | ||
mail(subject: t('.subject'), to: profile.user.email, | ||
body: t('.body', title: project_title)) | ||
@profile = Profile.find(params[:profile_id]) | ||
@project_title = params[:project_title] | ||
mail(subject: t('.subject'), to: @profile.user.email) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<p><%= t('.greeting', recipient: @profile.full_name) %></p> | ||
|
||
<p><%= t('.body', title: @project_title) %></p> | ||
|
||
<p><%= link_to t('click_btn'), invitations_url %> <%= t('.access_invitations') %></p> | ||
<%= t('.regards') %> | ||
<p>Portfoliorrr</p> |
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
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 |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
expect(mail.subject).to include 'Alguém seguiu seu perfil' | ||
expect(mail.to).to eq [followed_profile.email] | ||
expect(mail.from).to eq ['[email protected]'] | ||
expect(mail.body).to include 'Danilo Martins começou a seguir você' | ||
expect(mail.body).to include "<a href=\"#{profile_url(follower.profile)}\">" | ||
expect(mail.body).to include 'Danilo Martins</a> começou a seguir você' | ||
end | ||
end | ||
end |