diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-30 13:38:12 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-30 13:38:12 -0500 |
commit | 2dadf73891431ff16709ae41ccb552a56ce34c32 (patch) | |
tree | 583aa65ae73c5afffaa9dd8a128cc34c4d065e71 | |
parent | d3cb00b87e05da90319e85d08928b7a4bcb8be59 (diff) | |
download | rails-2dadf73891431ff16709ae41ccb552a56ce34c32.tar.gz rails-2dadf73891431ff16709ae41ccb552a56ce34c32.tar.bz2 rails-2dadf73891431ff16709ae41ccb552a56ce34c32.zip |
Document with with an example an link to Parameterized
Also change the class_methods to ClassMethods since the former document
the method as an instance method of Parameterized not as a class method.
-rw-r--r-- | actionmailer/lib/action_mailer/parameterized.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/parameterized.rb b/actionmailer/lib/action_mailer/parameterized.rb index 1c6e5da9fe..3acacc1f14 100644 --- a/actionmailer/lib/action_mailer/parameterized.rb +++ b/actionmailer/lib/action_mailer/parameterized.rb @@ -89,7 +89,12 @@ module ActionMailer attr_accessor :params end - class_methods do + module ClassMethods + # Provide the parameters to the mailer in order to use them in the instance methods and callbacks. + # + # InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later + # + # See Parameterized documentation for full example. def with(params) ActionMailer::Parameterized::Mailer.new(self, params) end |