diff options
author | Paul Nikitochkin <paul.nikitochkin@gmail.com> | 2013-09-06 21:41:04 +0300 |
---|---|---|
committer | Paul Nikitochkin <paul.nikitochkin@gmail.com> | 2013-09-06 21:42:29 +0300 |
commit | 2c8bc2cdcdb7b144b7a583d24922fd8064bcff3d (patch) | |
tree | 279e76293ba90dcc46e7716ecf78fbc1df221e79 /guides/source/action_mailer_basics.md | |
parent | 97a19c6b4b71d1e12d62d880ec8c8eed357b3d3c (diff) | |
download | rails-2c8bc2cdcdb7b144b7a583d24922fd8064bcff3d.tar.gz rails-2c8bc2cdcdb7b144b7a583d24922fd8064bcff3d.tar.bz2 rails-2c8bc2cdcdb7b144b7a583d24922fd8064bcff3d.zip |
Use Ruby on Rails Coding Conventions for code examples in the guides
* Indent after private/protected
* Ruby >= 1.9 syntax for hashes
* Prefer method { do_stuff } instead of method{do_stuff} for single-line blocks.
[ci skip]
Diffstat (limited to 'guides/source/action_mailer_basics.md')
-rw-r--r-- | guides/source/action_mailer_basics.md | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md index bf34799eb3..93a2b89ede 100644 --- a/guides/source/action_mailer_basics.md +++ b/guides/source/action_mailer_basics.md @@ -569,25 +569,25 @@ class UserMailer < ActionMailer::Base private - def set_delivery_options - # You have access to the mail instance, - # @business and @user instance variables here - if @business && @business.has_smtp_settings? - mail.delivery_method.settings.merge!(@business.smtp_settings) + def set_delivery_options + # You have access to the mail instance, + # @business and @user instance variables here + if @business && @business.has_smtp_settings? + mail.delivery_method.settings.merge!(@business.smtp_settings) + end end - end - def prevent_delivery_to_guests - if @user && @user.guest? - mail.perform_deliveries = false + def prevent_delivery_to_guests + if @user && @user.guest? + mail.perform_deliveries = false + end end - end - def set_business_headers - if @business - headers["X-SMTPAPI-CATEGORY"] = @business.code + def set_business_headers + if @business + headers["X-SMTPAPI-CATEGORY"] = @business.code + end end - end end ``` |