mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
13 lines
358 B
Ruby
13 lines
358 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ParamsMailer < ActionMailer::Base
|
|
before_action { @inviter, @invitee = params[:inviter], params[:invitee] }
|
|
|
|
default to: Proc.new { @invitee }, from: -> { @inviter }
|
|
|
|
def invitation
|
|
mail(subject: "Welcome to the project!") do |format|
|
|
format.text { render plain: "So says #{@inviter}" }
|
|
end
|
|
end
|
|
end
|