diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-07-23 07:48:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-23 07:48:17 +0200 |
commit | 1ca571cc472ffea2dfab43ee57d8204e89d5b1a6 (patch) | |
tree | a25b556825cf0bf8b02e5ef878621efcc3665aa6 | |
parent | 0020f1a4c96731a17ac4f84fa67058b5bc459fe2 (diff) | |
parent | 8ad6260538aa211a90834df18a74f59f63e67bca (diff) | |
download | rails-1ca571cc472ffea2dfab43ee57d8204e89d5b1a6.tar.gz rails-1ca571cc472ffea2dfab43ee57d8204e89d5b1a6.tar.bz2 rails-1ca571cc472ffea2dfab43ee57d8204e89d5b1a6.zip |
Merge pull request #25908 from mechanicles/derives-from
Explain meaning of the code very well and Remove confusion. [ci skip]
-rw-r--r-- | actionview/lib/action_view/helpers/cache_helper.rb | 8 | ||||
-rw-r--r-- | guides/source/caching_with_rails.md | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index e28b02f015..6c3092cc46 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -69,11 +69,11 @@ module ActionView # render 'comments/comments' # render('comments/comments') # - # render "header" => render("comments/header") + # render "header" translates to render("comments/header") # - # render(@topic) => render("topics/topic") - # render(topics) => render("topics/topic") - # render(message.topics) => render("topics/topic") + # render(@topic) translates to render("topics/topic") + # render(topics) translates to render("topics/topic") + # render(message.topics) translates to render("topics/topic") # # It's not possible to derive all render calls like that, though. # Here are a few examples of things that can't be derived: diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md index 6c734c1d78..ad1f20e645 100644 --- a/guides/source/caching_with_rails.md +++ b/guides/source/caching_with_rails.md @@ -198,11 +198,11 @@ render "comments/comments" render 'comments/comments' render('comments/comments') -render "header" => render("comments/header") +render "header" translates to render("comments/header") -render(@topic) => render("topics/topic") -render(topics) => render("topics/topic") -render(message.topics) => render("topics/topic") +render(@topic) translates to render("topics/topic") +render(topics) translates to render("topics/topic") +render(message.topics) translates to render("topics/topic") ``` On the other hand, some calls need to be changed to make caching work properly. |