Class: Rack::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/cuba/ron.rb

Instance Method Summary collapse

Instance Method Details

#redirect(target, status = 302) ⇒ Object

301 Moved Permanently 302 Found 303 See Other 307 Temporary Redirect



9
10
11
12
# File 'lib/cuba/ron.rb', line 9

def redirect(target, status = 302)
  self.status = status
  self["Location"] = target
end