I see many examples like this:
def show
@article = Article.find(params[:id])
fresh_when(@article)
end
However the page also contains information (like top navigation) about the logged in user. A user can:
- log in as user A
- visit the article
- log out
- log in as user B
- visit the article again
... Oops the user will see data about user A, instead of user B, because the article was not modified.
How can I include the current user id in the hash (etag)? Or, are there any other solutions to avoid the issue described above?