Class: DeferredRequest::TestController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- DeferredRequest::TestController
- Defined in:
- app/controllers/deferred_request/test_controller.rb
Instance Method Summary collapse
- #status_callback ⇒ Object
- #status_callback_deferred(deferred_request) ⇒ Object
- #status_error ⇒ Object
Instance Method Details
#status_callback ⇒ Object
3 4 5 6 |
# File 'app/controllers/deferred_request/test_controller.rb', line 3 def status_callback head :ok DeferredRequest.perform_later_from_request!(request) end |
#status_callback_deferred(deferred_request) ⇒ Object
8 9 10 11 |
# File 'app/controllers/deferred_request/test_controller.rb', line 8 def status_callback_deferred(deferred_request) # Do something with the deferred request deferred_request.params.dig("answer") end |
#status_error ⇒ Object
13 14 15 16 17 |
# File 'app/controllers/deferred_request/test_controller.rb', line 13 def status_error # don't add the "_deferred" method (used for testing) head :ok DeferredRequest.perform_later_from_request!(request) end |