Sha256: 9655db36ab6906503dd1eb246b017f8f9ebf38d5d30af72bcea740c163b25f92

Contents?: true

Size: 558 Bytes

Versions: 8

Compression:

Stored size: 558 Bytes

Contents

module Locomotive::Steam
  module Middlewares

    # When rendering the page, the developer can stop it at anytime by
    # raising an RedirectionException exception. The exception message holds
    # the url we want the user to be redirected to.
    # This is specifically used by the authorize liquid tag.
    #
    class Redirection < ThreadSafe

      include Helpers

      def _call
        begin
          self.next
        rescue Locomotive::Steam::RedirectionException => e
          redirect_to e.url, 302
        end
      end

    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotivecms_steam-1.4.1 lib/locomotive/steam/middlewares/redirection.rb
locomotivecms_steam-1.4.0 lib/locomotive/steam/middlewares/redirection.rb
locomotivecms_steam-1.4.0.rc2 lib/locomotive/steam/middlewares/redirection.rb
locomotivecms_steam-1.4.0.rc1 lib/locomotive/steam/middlewares/redirection.rb
locomotivecms_steam-1.4.0.pre.rc.1 lib/locomotive/steam/middlewares/redirection.rb
locomotivecms_steam-1.3.0 lib/locomotive/steam/middlewares/redirection.rb
locomotivecms_steam-1.3.0.rc2 lib/locomotive/steam/middlewares/redirection.rb
locomotivecms_steam-1.3.0.rc1 lib/locomotive/steam/middlewares/redirection.rb