Created
March 23, 2017 05:54
-
-
Save 8parth/58ce188efca71c14890e618f6c900765 to your computer and use it in GitHub Desktop.
new parameterized mailers example
This file contains hidden or 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
| class UserMailer < ApplicationMailer | |
| before_action { | |
| @email = params[:email] | |
| @name = params[:name] | |
| @message = params[:message] | |
| } | |
| default to: -> { @email }, | |
| from: -> { "[email protected]" } | |
| def sign_up | |
| mail subject: "Confirm your email!" | |
| end | |
| def welcome | |
| mail subject: "Welcome to Example." | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment