diff options
author | Stormwind <stormwind@stormwinds-page.de> | 2012-11-30 19:13:41 +0100 |
---|---|---|
committer | Stormwind <stormwind@stormwinds-page.de> | 2012-11-30 19:13:41 +0100 |
commit | 6b9f34cb61c1169b75c22ff53dd50f7115120eed (patch) | |
tree | 0925f01f2a68d189e27837aad8fa4e0d3a3cb820 /lib | |
parent | facd4f143bb3f0bb44d89b6ff11e61a0b7c36427 (diff) |
Optional setting of status code on redirect
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zero/response.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/zero/response.rb b/lib/zero/response.rb index a3e1651..15fb8c7 100644 --- a/lib/zero/response.rb +++ b/lib/zero/response.rb @@ -71,8 +71,8 @@ module Zero # # @param [String] location Redirect URL # - def redirect(location) - self.status = 302 + def redirect(location, status = 302) + self.status = status self.header['Location'] = location end |