From 4cfc60a6c8b4e6c01d433abdcf0f6d9873732c43 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 9 Sep 2007 22:55:16 +0000 Subject: [PATCH] Removed deprecated ActionController::Base.cookie (use ActionController#Base.cookies[]= instead) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 7 +++++++ actionpack/lib/action_controller/cookies.rb | 5 ----- actionpack/test/controller/cookie_test.rb | 4 ---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 8c709694b0..9b5d4d33bf 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,12 @@ *SVN* +* Removed deprecated methods [DHH]: + + - ActionController::Base#keep_flash (use flash.keep instead) + - ActionController::Base#expire_matched_fragments (just call expire_fragment with a regular expression) + - ActionController::Base.template_root/= methods (use ActionController#Base.view_paths/= instead) + - ActionController::Base.cookie (use ActionController#Base.cookies[]= instead) + * Removed the deprecated behavior of appending ".png" to image_tag/image_path calls without an existing extension [DHH] * Removed ActionController::Base.scaffold -- it went through the whole idea of scaffolding (card board walls you remove and tweak one by one). Use the scaffold generator instead (it does resources too now!) [DHH] diff --git a/actionpack/lib/action_controller/cookies.rb b/actionpack/lib/action_controller/cookies.rb index 7990eab45e..0f01873064 100644 --- a/actionpack/lib/action_controller/cookies.rb +++ b/actionpack/lib/action_controller/cookies.rb @@ -30,11 +30,6 @@ module Cookies def cookies CookieJar.new(self) end - - # Deprecated cookie writer method - def cookie(*options) - response.headers['cookie'] << CGI::Cookie.new(*options) - end end class CookieJar < Hash #:nodoc: diff --git a/actionpack/test/controller/cookie_test.rb b/actionpack/test/controller/cookie_test.rb index e6b6045af9..35c6e8b1bd 100644 --- a/actionpack/test/controller/cookie_test.rb +++ b/actionpack/test/controller/cookie_test.rb @@ -2,10 +2,6 @@ class CookieTest < Test::Unit::TestCase class TestController < ActionController::Base - def authenticate_with_deprecated_writer - cookie "name" => "user_name", "value" => "david" - end - def authenticate cookies["user_name"] = "david" end -- GitLab