diff options
author | Carl Lerche <me@carllerche.com> | 2010-09-17 14:20:35 -0700 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2010-09-17 14:20:35 -0700 |
commit | 5ff2b73b4806f135f7279604faf938239dc8ce36 (patch) | |
tree | 2b4f85aeb3e396573f50a13dd1c3061c460345e4 | |
parent | 117daba18a269988292ce3872683fba0517d31df (diff) | |
download | rails-5ff2b73b4806f135f7279604faf938239dc8ce36.tar.gz rails-5ff2b73b4806f135f7279604faf938239dc8ce36.tar.bz2 rails-5ff2b73b4806f135f7279604faf938239dc8ce36.zip |
Small tweak the ConditionalGet documentation
Time#utc does not need to be called when passing the object to :last_modified since it is called internally to Rails.
-rw-r--r-- | actionpack/lib/action_controller/metal/conditional_get.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/conditional_get.rb b/actionpack/lib/action_controller/metal/conditional_get.rb index 797ad846f6..8930c13a68 100644 --- a/actionpack/lib/action_controller/metal/conditional_get.rb +++ b/actionpack/lib/action_controller/metal/conditional_get.rb @@ -17,7 +17,7 @@ module ActionController # # def show # @article = Article.find(params[:id]) - # fresh_when(:etag => @article, :last_modified => @article.created_at.utc, :public => true) + # fresh_when(:etag => @article, :last_modified => @article.created_at, :public => true) # end # # This will render the show template if the request isn't sending a matching etag or @@ -48,7 +48,7 @@ module ActionController # def show # @article = Article.find(params[:id]) # - # if stale?(:etag => @article, :last_modified => @article.created_at.utc) + # if stale?(:etag => @article, :last_modified => @article.created_at) # @statistics = @article.really_expensive_call # respond_to do |format| # # all the supported formats |