mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update changelog for conditional GET utility methods
This commit is contained in:
parent
ba2d61dd81
commit
08b0cf07db
1 changed files with 8 additions and 2 deletions
|
@ -7,8 +7,14 @@
|
|||
* Update Prototype to 1.6.0.2 #599 [Patrick Joyce]
|
||||
|
||||
* Conditional GET utility methods. [Jeremy Kemper]
|
||||
* etag!([:admin, post, current_user]) sets the ETag response header and returns head(:not_modified) if it matches the If-None-Match request header.
|
||||
* last_modified!(post.updated_at) sets Last-Modified and returns head(:not_modified) if it's no later than If-Modified-Since.
|
||||
response.last_modified = @post.updated_at
|
||||
response.etag = [:admin, @post, current_user]
|
||||
|
||||
if request.fresh?(response)
|
||||
head :not_modified
|
||||
else
|
||||
# render ...
|
||||
end
|
||||
|
||||
* All 2xx requests are considered successful [Josh Peek]
|
||||
|
||||
|
|
Loading…
Reference in a new issue