Module: Jets::Controller::Decorate::Redirecting
Instance Method Summary collapse
-
#_compute_redirect_to_location(request, options) ⇒ Object
:nodoc:.
- #redirect_back(fallback_location: '/') ⇒ Object
Methods included from ApigwStage
#add_apigw_stage, #add_apigw_stage?
Instance Method Details
#_compute_redirect_to_location(request, options) ⇒ Object
:nodoc:
5 6 7 8 9 |
# File 'lib/jets/controller/decorate/redirecting.rb', line 5 def _compute_redirect_to_location(request, ) # :nodoc: adjust = .respond_to?(:to_str) || .is_a?(String) = add_apigw_stage() if adjust super end |
#redirect_back(fallback_location: '/') ⇒ Object
11 12 13 14 |
# File 'lib/jets/controller/decorate/redirecting.rb', line 11 def redirect_back(fallback_location: '/') location = request.headers["Referer"] || fallback_location redirect_to location end |