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
|
# Before
|
||||||
def index
|
def index
|
||||||
@article = Article.all
|
@articles = Article.all
|
||||||
fresh_when(etag: @articles, last_modified: @articles.maximum(:created_at))
|
fresh_when(etag: @articles, last_modified: @articles.maximum(:updated_at))
|
||||||
end
|
end
|
||||||
|
|
||||||
# After
|
# After
|
||||||
def index
|
def index
|
||||||
@article = Article.all
|
@articles = Article.all
|
||||||
fresh_when(@articles)
|
fresh_when(@articles)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue