Module Innate::Helper::Redirect
In: lib/innate/helper/redirect.rb

Methods

Public Instance methods

target should be anything responding to to_s. To check or modify the URI the redirect will go to you may pass a block, the result value of the block is ignored:

  redirect("/"){|uri| uri.scheme = 'http' }
  redirect("/"){|uri| uri.host = 'secure.com' if uri.scheme =~ /s/ }

options may contain:

  :scheme => "http" | "https" | "ftp" | ...
  :host   => "localhost" | "foo.com" | "123.123.123.123" | ...
  :port   => 7000 | "80" | 80 | ...

  :status => 302 | 300 | 303 | ...
  :body   => "This is a redirect, hold on while we teleport" | ...

  :raw!   => true | false | nil | ...

Note that all options are optional and you may just pass a target.

redirect_referer(fallback = Innate.options.prefix)

Alias for redirect_referrer

[Validate]