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/lib | |
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/lib')
-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 a6747fca7c..1645400693 100644 --- a/actionpack/lib/action_controller/metal/conditional_get.rb +++ b/actionpack/lib/action_controller/metal/conditional_get.rb @@ -23,7 +23,7 @@ module ActionController # This will render the show template if the request isn't sending a matching etag or # If-Modified-Since header and just a <tt>304 Not Modified</tt> response if there's a match. # - # You can also just pass a record where last_modified will be set by calling last_modified and the etag by passing the object itself. Example: + # You can also just pass a record where last_modified will be set by calling updated_at and the etag by passing the object itself. Example: # # def show # @article = Article.find(params[:id]) @@ -42,7 +42,7 @@ module ActionController options.assert_valid_keys(:etag, :last_modified, :public) else record = record_or_options - options = { :etag => record, :last_modified => record.try(:last_modified) }.merge(additional_options) + options = { :etag => record, :last_modified => record.try(:updated_at) }.merge(additional_options) end response.etag = options[:etag] if options[:etag] |