Added ActionController#cookies as a reader for
@Cookies that'll ret…
…urn the value of the cookie instead of the cookie object itself. NOTE: If you were using the old accessor, this could potentially break your code -- if you expect a full cookie object!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@18 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Loading branch information
2 changed files
and 4 deletions.
@@ -1,5 +1,8 @@
* Added ActionController#cookies as a reader for @cookies that'll return the value of the cookie instead of the cookie object itself.
NOTE: If you were using the old accessor, this could potentially break your code -- if you expect a full cookie object!
* Added the opportunity to defined method_missing on a controller which will handle all requests for actions not otherwise defined #223 [timb]
* Fixed AbstractRequest#remote_ip for users going through proxies - Patch #228 [Eric Hodel]
@@ -235,10 +235,6 @@ class Base
# directive. Values should always be specified as strings.
# Holds a hash of cookie names and values. Accessed like <tt>@cookies["user_name"]</tt> to get the value of the user_name cookie.
# This hash is read-only. You set new cookies using the cookie method.
# Holds the hash of variables that are passed on to the template class to be made available to the view. This hash
# is generated by taking a snapshot of all the instance variables in the current scope just before a template is rendered.
@@ -559,6 +555,11 @@ def cookie(*options) #:doc:
@response.headers[ ] "cookie " << CGI:: Cookie. new( *options)
# Returns the value of the cookie by +name+ -- or nil if no such cookie exist. You set new cookies using the cookie method.
@cookies[name].value if @cookies[name]
# Resets the session by clearsing out all the objects stored within and initializing a new session object.
def reset_session #:doc: