diff options
Diffstat (limited to 'actionview/CHANGELOG.md')
-rw-r--r-- | actionview/CHANGELOG.md | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index 8bd4e1e56c..2a38ca7b63 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,3 +1,69 @@ +* Return correct object name in form helper method after `fields_for`. + + Fixes #26931. + + *Yuji Yaginuma* + +* Use `ActionView::Resolver.caching?` (`config.action_view.cache_template_loading`) + to enable template recompilation. + + Before it was enabled by `consider_all_requests_local`, which caused + recompilation in tests. + + *Max Melentiev* + +* Add `form_with` to unify `form_tag` and `form_for` usage. + + Used like `form_tag` (where just the open tag is output): + + ```erb + <%= form_with scope: :post, url: super_special_posts_path %> + ``` + + Used like `form_for`: + + ```erb + <%= form_with model: @post do |form| %> + <%= form.text_field :title %> + <% end %> + ``` + + *Kasper Timm Hansen*, *Marek Kirejczyk* + +* Add `fields` form helper method. + + ```erb + <%= fields :comment, model: @comment do |fields| %> + <%= fields.text_field :title %> + <% end %> + ``` + + Can also be used within form helpers such as `form_with`. + + *Kasper Timm Hansen* + +* Removed deprecated `#original_exception` in `ActionView::Template::Error`. + + *Rafael Mendonça França* + +* Render now accepts any keys for locals, including reserved keywords. + + Only locals with valid variable names get set directly. Others + will still be available in `local_assigns`. + + Example of render with reserved keywords: + + ```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 |