Class: PostmanMta::AttachmentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Metal
- ApplicationController
- PostmanMta::AttachmentsController
- Includes:
- ActionController::DataStreaming
- Defined in:
- app/controllers/postman_mta/attachments_controller.rb
Constant Summary
Constants inherited from ApplicationController
PostmanMta::ApplicationController::MODULES
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/postman_mta/attachments_controller.rb', line 5 def show response = .find(params[:uuid]).deep_symbolize_keys file = response.dig(:json, :attachment) raise(PostmanMta::RecordNotFound, "Attachment via id #{params[:uuid]} not found") unless file if file[:body].present? (file) else (file) end end |