Method: MailsViewer::HomeController#attachment
- Defined in:
- app/controllers/mails_viewer/home_controller.rb
#attachment ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'app/controllers/mails_viewer/home_controller.rb', line 46 def if @filename mail = Mail.read(@filename) = mail.[params[:attachment]] if send_data .body.decoded, filename: params[:attachment], type: .content_type and return end end head :not_found end |