mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix typo in fresh_when example [ci skip]
This commit is contained in:
parent
debe7aedda
commit
697688663f
1 changed files with 3 additions and 3 deletions
|
@ -4,13 +4,13 @@
|
|||
|
||||
# Before
|
||||
def index
|
||||
@article = Article.all
|
||||
fresh_when(etag: @articles, last_modified: @articles.maximum(:created_at))
|
||||
@articles = Article.all
|
||||
fresh_when(etag: @articles, last_modified: @articles.maximum(:updated_at))
|
||||
end
|
||||
|
||||
# After
|
||||
def index
|
||||
@article = Article.all
|
||||
@articles = Article.all
|
||||
fresh_when(@articles)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue