diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-21 02:54:55 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-21 02:54:55 +0200 |
commit | 448e7e7c04260c34b816eb951427fc4409843cc8 (patch) | |
tree | 206b5aa0ae1ae36a8364166c7d8227e1427aae5a /actionpack/test/controller | |
parent | 68d84e259346c1bc3d8fd546162e5a93caf0bbdc (diff) | |
download | rails-448e7e7c04260c34b816eb951427fc4409843cc8.tar.gz rails-448e7e7c04260c34b816eb951427fc4409843cc8.tar.bz2 rails-448e7e7c04260c34b816eb951427fc4409843cc8.zip |
Let fresh_when actually do the head(:not_modified). Cleaner and we get the filter halting for free then.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 98d4cb3ffe..35d9b19cc0 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -41,9 +41,7 @@ class TestController < ActionController::Base before_filter :handle_last_modified_and_etags, :only=>:conditional_hello_with_bangs def handle_last_modified_and_etags - if fresh?(:last_modified => Time.now.utc.beginning_of_day, :etag => [ :foo, 123 ]) - head :not_modified - end + fresh_when(:last_modified => Time.now.utc.beginning_of_day, :etag => [ :foo, 123 ]) end def render_hello_world |