diff options
Diffstat (limited to 'actionpack/lib/action_controller/response.rb')
-rwxr-xr-x | actionpack/lib/action_controller/response.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb new file mode 100755 index 0000000000..836dd5ffef --- /dev/null +++ b/actionpack/lib/action_controller/response.rb @@ -0,0 +1,15 @@ +module ActionController + class AbstractResponse #:nodoc: + DEFAULT_HEADERS = { "Cache-Control" => "no-cache" } + attr_accessor :body, :headers, :session, :cookies, :assigns, :template, :redirected_to, :redirected_to_method_params + + def initialize + @body, @headers, @session, @assigns = "", DEFAULT_HEADERS.merge("cookie" => []), [], [] + end + + def redirect(to_url) + @headers["Status"] = "302 Moved" + @headers["location"] = to_url + end + end +end
\ No newline at end of file |