diff options
author | Matthew Draper <matthew@trebex.net> | 2016-10-02 21:10:26 +1030 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-02 21:10:26 +1030 |
commit | 7b63f56ce0c708f05db31de04b8cd2dc6e4ef96b (patch) | |
tree | 838e720c59e900a67064d13ee70af34a76b8d162 /actionview/CHANGELOG.md | |
parent | 832b02620b1331212a53186023688c8e84a4ca03 (diff) | |
parent | f9960f2d74b510e0d994d49377cec36301f7e7f0 (diff) | |
download | rails-7b63f56ce0c708f05db31de04b8cd2dc6e4ef96b.tar.gz rails-7b63f56ce0c708f05db31de04b8cd2dc6e4ef96b.tar.bz2 rails-7b63f56ce0c708f05db31de04b8cd2dc6e4ef96b.zip |
Merge pull request #26672 from schpet/support_ruby_keywords_as_template_locals
Avoid compiling ruby keywords into template locals
Diffstat (limited to 'actionview/CHANGELOG.md')
-rw-r--r-- | actionview/CHANGELOG.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index 8bd4e1e56c..e93745c3bf 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,3 +1,21 @@ +* Render now accepts any keys for locals, including reserved words + + Only locals with valid variable names get set directly. Others + will still be available in local_assigns. + + Example of render with reserved words: + + ```erb + <%= render "example", class: "text-center", message: "Hello world!" %> + + <!-- _example.html.erb: --> + <%= tag.div class: local_assigns[:class] do %> + <p><%= message %></p> + <% end %> + ``` + + *Peter Schilling*, *Matthew Draper* + * Show cache hits and misses when rendering partials. Partials using the `cache` helper will show whether a render hit or missed |