Permalink
Browse files

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.
  • Loading branch information...
1 parent 117daba commit 5ff2b73b4806f135f7279604faf938239dc8ce36 @carllerche carllerche committed Sep 17, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_controller/metal/conditional_get.rb
@@ -17,7 +17,7 @@ module ConditionalGet
#
# 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 @@ def fresh_when(options)
# 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

0 comments on commit 5ff2b73

Please sign in to comment.