diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-12-01 19:47:14 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-12-01 19:47:14 +0100 |
commit | 535853e83b9092078035a5abb2aa242fba815c05 (patch) | |
tree | de6348b219aaf625b2c0c651e4b5ff822c883a6e /actionpack/test/controller | |
parent | 218c2729384be487b7b743a58ac39753cb5a8856 (diff) | |
download | rails-535853e83b9092078035a5abb2aa242fba815c05.tar.gz rails-535853e83b9092078035a5abb2aa242fba815c05.tar.bz2 rails-535853e83b9092078035a5abb2aa242fba815c05.zip |
Added ActiveRecord::Base#last_modified to work with the new fresh_when/stale? conditional get methods from Action Pack
Diffstat (limited to 'actionpack/test/controller')
-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 243bad8749..e014d08ec9 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(:updated_at, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123") + record = Struct.new(:last_modified, :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(:updated_at, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123") + record = Struct.new(:last_modified, :cache_key).new(Time.now.utc.beginning_of_day, "foo/123") if stale?(record, :public => true) render :action => 'hello_world' |