add entry requests, invite new users
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
class InvitationMailer < ApplicationMailer
|
||||
def invite(user)
|
||||
def invite(user, approved_entry: nil)
|
||||
@user = user
|
||||
@approved_entry = approved_entry
|
||||
@invitation_url = invitation_url(@user.invitation_token)
|
||||
@expires_at = @user.invitation_sent_at + User::INVITATION_TOKEN_EXPIRY
|
||||
|
||||
subject = if @approved_entry
|
||||
"Your entry request has been approved - Join Sanasto Wiki"
|
||||
else
|
||||
"You've been invited to join Sanasto Wiki"
|
||||
end
|
||||
|
||||
mail(
|
||||
to: @user.email,
|
||||
subject: "You've been invited to join Sanasto Wiki"
|
||||
subject: subject
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user