mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
ebf916af2e
I wanted to add a test for sending an attachment that is an empty string and a file but got this error: NoMethodError: undefined method `original_filename' for "#<Rack::Test::UploadedFile:0x000000010840d388>":String Related: #44702 Fixes #45088 ----- Started POST "/rails/conductor/action_mailbox/inbound_emails" for ::1 at 2022-05-14 07:34:19 +0200 Processing by Rails::Conductor::ActionMailbox::InboundEmailsController#create as HTML Parameters: {"authenticity_token"=>"[FILTERED]", "mail"=>{"from"=>"", "to"=>"", "cc"=>"", "bcc"=>"", "x_original_to"=>"", "in_reply_to"=>"", "subject"=>"", "body"=>"", "attachments"=>[""]}, "commit"=>"Deliver inbound email"} Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.0ms | Allocations: 2600) NoMethodError (undefined method `original_filename' for "":String mail.add_file(filename: attachment.original_filename, content: attachment.read) ^^^^^^^^^^^^^^^^^^): actionmailbox (7.0.3) app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb:26:in `block (2 levels) in new_mail' actionmailbox (7.0.3) app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb:25:in `each' actionmailbox (7.0.3) app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb:25:in `block in new_mail' <internal:kernel>:90:in `tap' actionmailbox (7.0.3) app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb:23:in `new_mail' actionmailbox (7.0.3) app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb:17:in `create' Co-Authored-By: Patrício dos Santos <hello@psantos.dev> |
||
---|---|---|
.. | ||
ingresses | ||
rails/action_mailbox |