class_attributes are defined as public methods

This commit is contained in:
Akira Matsuda 2020-10-27 01:17:15 +09:00
parent 1f86a17031
commit 2013ebbd4a
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ module ActionMailer
# arguments: '-i'
def add_delivery_method(symbol, klass, default_options = {})
class_attribute(:"#{symbol}_settings") unless respond_to?(:"#{symbol}_settings")
send(:"#{symbol}_settings=", default_options)
public_send(:"#{symbol}_settings=", default_options)
self.delivery_methods = delivery_methods.merge(symbol.to_sym => klass).freeze
end