From 4a6eba3232fec13892f36fc4730bb2deef342fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 23:46:09 +1100 Subject: Added initial documentation for the new API --- actionmailer/CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionmailer/CHANGELOG') diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 785bf98c55..0018a2ed5d 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,5 +1,7 @@ *Rails 3.0 (pending)* +* Whole new API added with tests. See base.rb for full details. Old API is deprecated. + * The Mail::Message class has helped methods for all the field types that return 'common' defaults for the common use case, so to get the subject, mail.subject will give you a string, mail.date will give you a DateTime object, mail.from will give you an array of address specs (mikel@test.lindsaar.net) etc. If you want to access the field object itself, call mail[:field_name] which will return the field object you want, which you can then chain, like mail[:from].formatted * Mail#content_type now returns the content_type field as a string. If you want the mime type of a mail, then you call Mail#mime_type (eg, text/plain), if you want the parameters of the content type field, you call Mail#content_type_parameters which gives you a hash, eg {'format' => 'flowed', 'charset' => 'utf-8'} -- cgit v1.2.3