diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-12-19 22:51:42 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2018-12-19 22:51:42 +0100 |
commit | fb765de0eed1849c883f0a8b6d1a81bb11cd5353 (patch) | |
tree | 3140ad66aeeb625d3c6153d6dc87825cf3c101dd | |
parent | 78a530282ee7b55ba39c76cf5c67d0d239bb5edc (diff) | |
download | rails-fb765de0eed1849c883f0a8b6d1a81bb11cd5353.tar.gz rails-fb765de0eed1849c883f0a8b6d1a81bb11cd5353.tar.bz2 rails-fb765de0eed1849c883f0a8b6d1a81bb11cd5353.zip |
Use class_methods throughout codebase.
-rw-r--r-- | app/models/action_mailbox/inbound_email/message_id.rb | 6 | ||||
-rw-r--r-- | lib/action_mailbox/callbacks.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/models/action_mailbox/inbound_email/message_id.rb b/app/models/action_mailbox/inbound_email/message_id.rb index f10f59ea45..244a2e439b 100644 --- a/app/models/action_mailbox/inbound_email/message_id.rb +++ b/app/models/action_mailbox/inbound_email/message_id.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -# The `Message-ID` as specified by rfc822 is supposed to be a unique identifier for that individual email. -# That makes it an ideal tracking token for debugging and forensics, just like `X-Request-Id` does for +# The `Message-ID` as specified by rfc822 is supposed to be a unique identifier for that individual email. +# That makes it an ideal tracking token for debugging and forensics, just like `X-Request-Id` does for # web request. # # If an inbound email does not, against the rfc822 mandate, specify a Message-ID, one will be generated @@ -13,7 +13,7 @@ module ActionMailbox::InboundEmail::MessageId before_save :generate_missing_message_id end - module ClassMethods + class_methods do # Create a new `InboundEmail` from the raw `source` of the email, which be uploaded as a Active Storage # attachment called `raw_email`. Before the upload, extract the Message-ID from the `source` and set # it as an attribute on the new `InboundEmail`. diff --git a/lib/action_mailbox/callbacks.rb b/lib/action_mailbox/callbacks.rb index c6f07d7ccf..2b7212284b 100644 --- a/lib/action_mailbox/callbacks.rb +++ b/lib/action_mailbox/callbacks.rb @@ -17,7 +17,7 @@ module ActionMailbox define_callbacks :process, terminator: TERMINATOR, skip_after_callbacks_if_terminated: true end - module ClassMethods + class_methods do def before_processing(*methods, &block) set_callback(:process, :before, *methods, &block) end |