diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-12-01 20:45:47 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-12-01 20:45:47 +0100 |
commit | 83d29a283ceb13ff431da535e8cc35db6828016c (patch) | |
tree | af4af993955fc0fb0ecfdf96e969eac02bd7c492 /actionpack/test | |
parent | 535853e83b9092078035a5abb2aa242fba815c05 (diff) | |
download | rails-83d29a283ceb13ff431da535e8cc35db6828016c.tar.gz rails-83d29a283ceb13ff431da535e8cc35db6828016c.tar.bz2 rails-83d29a283ceb13ff431da535e8cc35db6828016c.zip |
Revert "Added ActiveRecord::Base#last_modified to work with the new fresh_when/stale? conditional get methods from Action Pack"
Needless indirection with no added value.
This reverts commit 535853e83b9092078035a5abb2aa242fba815c05.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index e014d08ec9..243bad8749 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -51,7 +51,7 @@ class TestController < ActionController::Base end def conditional_hello_with_record - record = Struct.new(:last_modified, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123") + record = Struct.new(:updated_at, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123") if stale?(record) render :action => 'hello_world' @@ -65,7 +65,7 @@ class TestController < ActionController::Base end def conditional_hello_with_public_header_with_record - record = Struct.new(:last_modified, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123") + record = Struct.new(:updated_at, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123") if stale?(record, :public => true) render :action => 'hello_world' |