diff options
Diffstat (limited to 'guides/source/api_app.md')
-rw-r--r-- | guides/source/api_app.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/api_app.md b/guides/source/api_app.md index feaaff166a..fb3127555e 100644 --- a/guides/source/api_app.md +++ b/guides/source/api_app.md @@ -221,7 +221,7 @@ For instance, using the `stale?` method: ```ruby def show - @post = Post.find(params[:id]) + @post = Post.find(params[:id]) if stale?(last_modified: @post.updated_at) render json: @post @@ -240,7 +240,7 @@ cross-client caching in the call to `stale?`: ```ruby def show - @post = Post.find(params[:id]) + @post = Post.find(params[:id]) if stale?(last_modified: @post.updated_at, public: true) render json: @post |