Sha256: 8541ec274074cd152462b495d5a73a33fee7d4fceb94122d2282da6aabb0a795

Contents?: true

Size: 442 Bytes

Versions: 15

Compression:

Stored size: 442 Bytes

Contents

module Jets::Controller::Decorate
  module Redirecting
    include ApigwStage

    def _compute_redirect_to_location(request, options) # :nodoc:
      adjust = options.respond_to?(:to_str) || options.is_a?(String)
      options = add_apigw_stage(options) if adjust
      super
    end

    def redirect_back(fallback_location: '/')
      location = request.headers["Referer"] || fallback_location
      redirect_to location
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jets-5.0.13 lib/jets/controller/decorate/redirecting.rb
jets-5.0.12 lib/jets/controller/decorate/redirecting.rb
jets-5.0.11 lib/jets/controller/decorate/redirecting.rb
jets-5.0.10 lib/jets/controller/decorate/redirecting.rb
jets-5.0.9 lib/jets/controller/decorate/redirecting.rb
jets-5.0.8 lib/jets/controller/decorate/redirecting.rb
jets-5.0.7 lib/jets/controller/decorate/redirecting.rb
jets-5.0.6 lib/jets/controller/decorate/redirecting.rb
jets-5.0.5 lib/jets/controller/decorate/redirecting.rb
jets-5.0.4 lib/jets/controller/decorate/redirecting.rb
jets-5.0.3 lib/jets/controller/decorate/redirecting.rb
jets-5.0.2 lib/jets/controller/decorate/redirecting.rb
jets-5.0.1 lib/jets/controller/decorate/redirecting.rb
jets-5.0.0 lib/jets/controller/decorate/redirecting.rb
jets-5.0.0.beta1 lib/jets/controller/decorate/redirecting.rb