Method: MultiMail::Receiver::Base::ClassMethods#add_file_arguments
- Defined in:
- lib/multi_mail/receiver/base.rb
#add_file_arguments(attachment) ⇒ Hash
ActionDispatch::Http::Request subclasses Rack::Request and turns attachment hashes into instances of ActionDispatch::Http::UploadedFile in Rails 3 and 4 and instances of ActionController::UploadedFile in Rails 2.3, both of which have the same interface.
69 70 71 72 73 74 75 |
# File 'lib/multi_mail/receiver/base.rb', line 69 def add_file_arguments() if Hash === {:filename => [:filename], :content => [:tempfile].read} else {:filename => .original_filename, :content => .read} end end |