Class: AppProfiler::Middleware::UploadAction
- Inherits:
-
BaseAction
- Object
- BaseAction
- AppProfiler::Middleware::UploadAction
- Defined in:
- lib/app_profiler/middleware/upload_action.rb
Class Method Summary collapse
Methods inherited from BaseAction
Class Method Details
.call(profile, response: nil, autoredirect: nil, async: false) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/app_profiler/middleware/upload_action.rb', line 7 def call(profile, response: nil, autoredirect: nil, async: false) if async profile.enqueue_upload response[1][AppProfiler.profile_async_header] = "true" else profile_upload = profile.upload append_headers( response, upload: profile_upload, autoredirect: autoredirect.nil? ? AppProfiler.autoredirect : autoredirect, ) if response end end |