Jonathan Martin
Articles tagged “wishlist”
-
Rails 3: Action Mailer
~ by Jonathan Martin
As a result of designing this blog, I’ve come to appreciate the refinement of Rails 3, and the drudgery of a few “less than perfect” spots.
ActionMailer (now powered by the Mail gem instead of TMail) is an incredible refactoring of the traditional Rails 2.x email system; frankly, before Rails 3, the email system was anything but elegant — besides the clunky API, none of the traditional view helpers were available, and multipart emails with attachments were hackish.
The new system takes a huge step in the right direction by incorporating a sleek API interface and merge of ActionMailer with the traditional ActionController/ActionView. In essence, whereas before the mailer and controller/views were entirely separate entities, ActionMailer now inherits from these classes, and consequently acts much more like a traditional view. This approach hugely simplifies the design process by recognizing the similarity between HTML webpages and HTML email.