Exception: Sidewalk::PermanentRedirect

Inherits:
Redirect show all
Defined in:
lib/sidewalk/redirect.rb

Overview

Use if a resource has permanently moved.

Does not change POST into GET.

Uses a 301 Moved Permanently response.

Instance Attribute Summary

Attributes inherited from Redirect

#url

Instance Method Summary collapse

Methods inherited from HttpError

#description, #status

Constructor Details

#initialize(url) ⇒ PermanentRedirect

Returns a new instance of PermanentRedirect.



32
33
34
# File 'lib/sidewalk/redirect.rb', line 32

def initialize url
  super url, 301, 'Moved Permanently'
end