From 6b9f34cb61c1169b75c22ff53dd50f7115120eed Mon Sep 17 00:00:00 2001 From: Stormwind Date: Fri, 30 Nov 2012 19:13:41 +0100 Subject: Optional setting of status code on redirect --- lib/zero/response.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3-70-g09d2