aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-09-18 15:22:28 +0900
committerGitHub <noreply@github.com>2017-09-18 15:22:28 +0900
commit1386efa6864efc69ec6f16633eee1c6c55fc4bfa (patch)
tree2a133e4c653ecb6b1ca9c3ba1d2f4b89a1ec17ec /guides
parenta9030737db1806759aa15894e8ca037f0ca5641e (diff)
parent62d547c6a47c45c033597bb744854e5b2f477c7e (diff)
downloadrails-1386efa6864efc69ec6f16633eee1c6c55fc4bfa.tar.gz
rails-1386efa6864efc69ec6f16633eee1c6c55fc4bfa.tar.bz2
rails-1386efa6864efc69ec6f16633eee1c6c55fc4bfa.zip
Merge pull request #30641 from ydakuka/js-upcase
Upcase js [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/caching_with_rails.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md
index 910a531068..96650b5be9 100644
--- a/guides/source/caching_with_rails.md
+++ b/guides/source/caching_with_rails.md
@@ -181,7 +181,7 @@ cache.
### Shared Partial Caching
-It is possible to share partials and associated caching between files with different mime types. For example shared partial caching allows template writers to share a partial between HTML and Javascript files. When templates are collected in the template resolver file paths they only include the template language extension and not the mime type. Because of this templates can be used for multiple mime types. Both HTML and JavaScript requests will respond to the following code:
+It is possible to share partials and associated caching between files with different mime types. For example shared partial caching allows template writers to share a partial between HTML and JavaScript files. When templates are collected in the template resolver file paths they only include the template language extension and not the mime type. Because of this templates can be used for multiple mime types. Both HTML and JavaScript requests will respond to the following code:
```ruby
render(partial: 'hotels/hotel', collection: @hotels, cached: true)
@@ -195,7 +195,7 @@ Another option is to include the full filename of the partial to render.
render(partial: 'hotels/hotel.html.erb', collection: @hotels, cached: true)
```
-Will load a file named `hotels/hotel.html.erb` in any file mime type, for example you could include this partial in a Javascript file.
+Will load a file named `hotels/hotel.html.erb` in any file mime type, for example you could include this partial in a JavaScript file.
### Managing dependencies