Created
December 16, 2012 16:39
-
-
Save house9/4309219 to your computer and use it in GitHub Desktop.
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 ExampleMailer < ActionMailer::Base | |
default from: "[email protected]" | |
# default layout for ExampleMailer | |
layout "customer_email" | |
# the order ready is sent to the customer and uses the default layout - customer_email | |
def order_ready | |
@greeting = "Hi" | |
mail to: "[email protected]" | |
end | |
# the ready to ship email is internal only - use the internal layout | |
def ready_to_ship | |
@greeting = "Hi Hi" | |
mail(to: "[email protected]") do |format| | |
format.html { render :layout => "internal_email" } | |
format.text { render :layout => "internal_email" } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment