diff options
author | José Valim and Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-20 22:25:09 +1100 |
---|---|---|
committer | José Valim and Mikel Lindsaar <raasdnil@gmail.com> | 2010-01-20 22:26:24 +1100 |
commit | 10c509fbfa70758ece26e8876d1c5c28f659f2f0 (patch) | |
tree | 6641a87224d788e174782610d5c083ed644c0514 /actionmailer/test | |
parent | 8b37fee201bb3f41d3bc4557422c5f8b344f456c (diff) | |
download | rails-10c509fbfa70758ece26e8876d1c5c28f659f2f0.tar.gz rails-10c509fbfa70758ece26e8876d1c5c28f659f2f0.tar.bz2 rails-10c509fbfa70758ece26e8876d1c5c28f659f2f0.zip |
Moved old API into deprecated_api.rb in preparation for new Rails 3 Mailer API
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/base_test.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb new file mode 100644 index 0000000000..dc1fbc07be --- /dev/null +++ b/actionmailer/test/base_test.rb @@ -0,0 +1,39 @@ +# class Notifier < ActionMailer::Base +# delivers_from 'notifications@example.com' +# +# def welcome(user) +# @user = user # available to the view +# mail(:subject => 'Welcome!', :to => user.email_address) +# # auto renders both welcome.text.erb and welcome.html.erb +# end +# +# def goodbye(user) +# headers["Reply-To"] = 'cancelations@example.com' +# mail(:subject => 'Goodbye', :to => user.email_address) do |format| +# format.html { render "shared_template "} +# format.text # goodbye.text.erb +# end +# end +# +# def surprise(user, gift) +# attachments[gift.name] = File.read(gift.path) +# mail(:subject => 'Surprise!', :to => user.email_address) do |format| +# format.html(:charset => "ascii") # surprise.html.erb +# format.text(:transfer_encoding => "base64") # surprise.text.erb +# end +# end +# +# def special_surprise(user, gift) +# attachments[gift.name] = { :content_type => "application/x-gzip", :content => File.read(gift.path) } +# mail(:to => 'special@example.com') # subject not required +# # auto renders both special_surprise.text.erb and special_surprise.html.erb +# end +# end +# +# Notifier.welcome(user) # => returns a Mail object +# Notifier.welcome(user).deliver # => creates and sends the Mail in one step +class BaseTest < ActionMailer::Base + + + +end |