diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2017-05-31 12:16:20 +0300 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2017-06-03 13:52:48 +0300 |
commit | b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c (patch) | |
tree | 5d2f9250f66f675280c2761daa52880b28d6a86e /actionmailer/lib | |
parent | a5b0c60714e1e8d8c182af830a26e1c7c884271d (diff) | |
download | rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.tar.gz rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.tar.bz2 rails-b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c.zip |
Use mattr_accessor default: option throughout the project
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/delivery_methods.rb | 11 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/preview.rb | 3 |
2 files changed, 4 insertions, 10 deletions
diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index afdc28aa2a..93ae10fd70 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -8,14 +8,9 @@ module ActionMailer included do # Do not make this inheritable, because we always want it to propagate - cattr_accessor :raise_delivery_errors - self.raise_delivery_errors = true - - cattr_accessor :perform_deliveries - self.perform_deliveries = true - - cattr_accessor :deliver_later_queue_name - self.deliver_later_queue_name = :mailers + cattr_accessor :raise_delivery_errors, default: true + cattr_accessor :perform_deliveries, default: true + cattr_accessor :deliver_later_queue_name, default: :mailers class_attribute :delivery_methods, default: {}.freeze class_attribute :delivery_method, default: :smtp diff --git a/actionmailer/lib/action_mailer/preview.rb b/actionmailer/lib/action_mailer/preview.rb index 87ba743f3d..4f72eca930 100644 --- a/actionmailer/lib/action_mailer/preview.rb +++ b/actionmailer/lib/action_mailer/preview.rb @@ -20,8 +20,7 @@ module ActionMailer mattr_accessor :show_previews, instance_writer: false # :nodoc: - mattr_accessor :preview_interceptors, instance_writer: false - self.preview_interceptors = [ActionMailer::InlinePreviewInterceptor] + mattr_accessor :preview_interceptors, instance_writer: false, default: [ActionMailer::InlinePreviewInterceptor] end module ClassMethods |