Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11557 (new enhancement)

Opened 8 months ago

[PATCH][TINY] Make AM::Base#render_message default hash argument to @body

Reported by: Henrik N Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionMailer Version: edge
Severity: normal Keywords: patch tiny
Cc:

Description

With ActionMailer, you can render templates by name with render_message. It takes the template name/path as the first argument, and a hash similar to partial locals as the second one.

This patch just makes that second argument default to @body. Also has tests.

This means that if the template has no "locals", you can leave the second argument unspecified (since ActionMailer::Base initiates @body to an empty hash). It also means that you can use @body[:recipient] etc as usual and then not have to explicitly pass that in.

Attachments

action_mailer_render_message_implicit_body_hash.diff (2.1 kB) - added by Henrik N on 04/09/08 10:50:05.

Change History

04/09/08 10:50:05 changed by Henrik N

  • attachment action_mailer_render_message_implicit_body_hash.diff added.