aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-09-02 19:32:45 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-09-02 19:32:45 +0000
commit20bd4bd3e2bff716acdf48bba1b97a1afdcd088d (patch)
tree8b2432b15350437dc5e9c42e83bd6fbbd97a7b4a /actionmailer
parentbf2bddd29fca60754d6aba60b55d109f5b78fb48 (diff)
downloadrails-20bd4bd3e2bff716acdf48bba1b97a1afdcd088d.tar.gz
rails-20bd4bd3e2bff716acdf48bba1b97a1afdcd088d.tar.bz2
rails-20bd4bd3e2bff716acdf48bba1b97a1afdcd088d.zip
Updated docs and otherwise
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/CHANGELOG2
-rw-r--r--actionmailer/MIT-LICENSE2
-rwxr-xr-xactionmailer/README2
-rwxr-xr-xactionmailer/Rakefile2
-rwxr-xr-xactionmailer/lib/action_mailer.rb2
-rw-r--r--actionmailer/lib/action_mailer/base.rb44
-rw-r--r--actionmailer/lib/action_mailer/version.rb2
7 files changed, 46 insertions, 10 deletions
diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG
index 53830283f8..ba73da30a4 100644
--- a/actionmailer/CHANGELOG
+++ b/actionmailer/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@siliconcircus.com]
+
* Tighten rescue clauses. #5985 [james@grayproductions.net]
* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [DHH]
diff --git a/actionmailer/MIT-LICENSE b/actionmailer/MIT-LICENSE
index 26f55e7799..5856add6e4 100644
--- a/actionmailer/MIT-LICENSE
+++ b/actionmailer/MIT-LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2004 David Heinemeier Hansson
+Copyright (c) 2004-2006 David Heinemeier Hansson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/actionmailer/README b/actionmailer/README
index 8c85e1aeb7..4a1e79ac9f 100755
--- a/actionmailer/README
+++ b/actionmailer/README
@@ -1,7 +1,7 @@
= Action Mailer -- Easy email delivery and testing
Action Mailer is a framework for designing email-service layers. These layers
-are used to consolidate code for sending out forgotten passwords, welcoming
+are used to consolidate code for sending out forgotten passwords, welcome
wishes on signup, invoices for billing, and any other use case that requires
a written notification to either a person or another system.
diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile
index 298d91925d..6095c6dced 100755
--- a/actionmailer/Rakefile
+++ b/actionmailer/Rakefile
@@ -54,7 +54,7 @@ spec = Gem::Specification.new do |s|
s.rubyforge_project = "actionmailer"
s.homepage = "http://www.rubyonrails.org"
- s.add_dependency('actionpack', '= 1.12.1' + PKG_BUILD)
+ s.add_dependency('actionpack', '= 1.12.5' + PKG_BUILD)
s.has_rdoc = true
s.requirements << 'none'
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb
index 894bc824ee..c702a06dc7 100755
--- a/actionmailer/lib/action_mailer.rb
+++ b/actionmailer/lib/action_mailer.rb
@@ -27,7 +27,7 @@ unless defined?(ActionController)
require 'action_controller'
rescue LoadError
require 'rubygems'
- require_gem 'actionpack', '>= 1.9.1'
+ require_gem 'actionpack', '>= 1.12.5'
end
end
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 7045fddb1b..00b02c746e 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -7,7 +7,9 @@ require 'tmail/net'
module ActionMailer #:nodoc:
# ActionMailer allows you to send email from your application using a mailer model and views.
#
+ #
# = Mailer Models
+ #
# To use ActionMailer, you need to create a mailer model.
#
# $ script/generate mailer Notifier
@@ -23,7 +25,7 @@ module ActionMailer #:nodoc:
# recipients recipient.email_address_with_name
# from "system@example.com"
# subject "New account information"
- # body "account" => recipient
+ # body :account => recipient
# end
# end
#
@@ -45,7 +47,9 @@ module ActionMailer #:nodoc:
# in an instance variable <tt>@account</tt> with the value of <tt>recipient</tt> being accessible in the
# view.
#
- # = Mailer Views
+ #
+ # = Mailer views
+ #
# Like ActionController, each mailer class has a corresponding view directory
# in which each method of the class looks for a template with its name.
# To define a template to be used with a mailing, create an <tt>.rhtml</tt> file with the same name as the method
@@ -59,7 +63,30 @@ module ActionMailer #:nodoc:
# Hi <%= @account.name %>,
# Thanks for joining our service! Please check back often.
#
- # = Sending Mail
+ # You can even use Action Pack helpers in these views. For example:
+ #
+ # You got a new note!
+ # <%= truncate(note.body, 25) %>
+ #
+ #
+ # = Generating URLs for mailer views
+ #
+ # If your view includes URLs from the application, you need to use url_for in the mailing method instead of the view.
+ # Unlike controllers from Action Pack, the mailer instance doesn't have any context about the incoming request. That's
+ # why you need to jump this little hoop and supply all the details needed for the URL. Example:
+ #
+ # def signup_notification(recipient)
+ # recipients recipient.email_address_with_name
+ # from "system@example.com"
+ # subject "New account information"
+ # body :account => recipient,
+ # :home_page => url_for(:host => "example.com", :controller => "welcome", :action => "greeting")
+ # end
+ #
+ # You can now access @home_page in the template and get http://example.com/welcome/greeting.
+ #
+ # = Sending mail
+ #
# Once a mailer action and template are defined, you can deliver your message or create it and save it
# for delivery later:
#
@@ -73,7 +100,9 @@ module ActionMailer #:nodoc:
# like to deliver. The <tt>signup_notification</tt> method defined above is
# delivered by invoking <tt>Notifier.deliver_signup_notification</tt>.
#
- # = HTML Email
+ #
+ # = HTML email
+ #
# To send mail as HTML, make sure your view (the <tt>.rhtml</tt> file) generates HTML and
# set the content type to html.
#
@@ -87,7 +116,9 @@ module ActionMailer #:nodoc:
# end
# end
#
- # = Multipart Email
+ #
+ # = Multipart email
+ #
# You can explicitly specify multipart messages:
#
# class ApplicationMailer < ActionMailer::Base
@@ -120,7 +151,9 @@ module ActionMailer #:nodoc:
# with the corresponding content type. The same body hash is passed to
# each template.
#
+ #
# = Attachments
+ #
# Attachments can be added by using the +attachment+ method.
#
# Example:
@@ -141,6 +174,7 @@ module ActionMailer #:nodoc:
# end
# end
#
+ #
# = Configuration options
#
# These options are specified on the class level, like <tt>ActionMailer::Base.template_root = "/my/templates"</tt>
diff --git a/actionmailer/lib/action_mailer/version.rb b/actionmailer/lib/action_mailer/version.rb
index ba6a301cf9..21bc3f6a92 100644
--- a/actionmailer/lib/action_mailer/version.rb
+++ b/actionmailer/lib/action_mailer/version.rb
@@ -2,7 +2,7 @@ module ActionMailer
module VERSION #:nodoc:
MAJOR = 1
MINOR = 2
- TINY = 1
+ TINY = 5
STRING = [MAJOR, MINOR, TINY].join('.')
end