From 83a44867c7ead753a5014afa08f3f4ebf2efba77 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 27 Sep 2018 17:58:45 -0700 Subject: [PATCH] Inline anemic method --- .../conductor/action_mailroom/inbound_emails_controller.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/rails/conductor/action_mailroom/inbound_emails_controller.rb b/app/controllers/rails/conductor/action_mailroom/inbound_emails_controller.rb index 0f8ebb00a3..a5a1f34929 100644 --- a/app/controllers/rails/conductor/action_mailroom/inbound_emails_controller.rb +++ b/app/controllers/rails/conductor/action_mailroom/inbound_emails_controller.rb @@ -21,10 +21,7 @@ class Rails::Conductor::ActionMailroom::InboundEmailsController < Rails::Conduct end def create_inbound_email(mail) - ActionMailroom::InboundEmail.create! raw_email: new_raw_email(mail), message_id: mail.message_id - end - - def new_raw_email(mail) - { io: StringIO.new(new_mail.to_s), filename: 'inbound.eml', content_type: 'message/rfc822', identify: false } + ActionMailroom::InboundEmail.create! raw_email: \ + { io: StringIO.new(mail.to_s), filename: 'inbound.eml', content_type: 'message/rfc822', identify: false } end end