diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-12-27 00:19:51 +0200 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-12-27 01:30:29 +0200 |
commit | 3adb2619857fabdbd40de8fd4199f3b7ffdaed36 (patch) | |
tree | 78f565633df8049313d71646abfc2c0b584b6766 /actionmailbox | |
parent | 2ee75ae7166fb47615da044d3735cc328fbea56e (diff) | |
download | rails-3adb2619857fabdbd40de8fd4199f3b7ffdaed36.tar.gz rails-3adb2619857fabdbd40de8fd4199f3b7ffdaed36.tar.bz2 rails-3adb2619857fabdbd40de8fd4199f3b7ffdaed36.zip |
Fix Ruby warnings in actionmailbox
```
rails/actionmailbox$ bundle exec rake tests
(snip)
...
rails/activerecord/lib/active_record/persistence.rb:48: warning: in `create!':
the last argument was passed as a single Hash
rails/actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb:21:
warning: although a splat keyword arguments here
...
(snip)
```
Diffstat (limited to 'actionmailbox')
-rw-r--r-- | actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb b/actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb index 244a2e439b..2ad4525929 100644 --- a/actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb +++ b/actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb @@ -18,7 +18,7 @@ module ActionMailbox::InboundEmail::MessageId # attachment called `raw_email`. Before the upload, extract the Message-ID from the `source` and set # it as an attribute on the new `InboundEmail`. def create_and_extract_message_id!(source, **options) - create! message_id: extract_message_id(source), **options do |inbound_email| + create! options.merge(message_id: extract_message_id(source)) do |inbound_email| inbound_email.raw_email.attach io: StringIO.new(source), filename: "message.eml", content_type: "message/rfc822" end end |