## Rails 7.0.7.1 (August 22, 2023) ## * No changes. ## Rails 7.0.7 (August 09, 2023) ## * Fix `render collection: @records, cache: true` to cache fragments as bare strings Previously it would incorrectly cache them as Action View buffers. *Jean Boussier* * Don't double-encode nested `field_id` and `field_name` index values Pass `index: @options` as a default keyword argument to `field_id` and `field_name` view helper methods. *Sean Doyle* ## Rails 7.0.6 (June 29, 2023) ## * No changes. ## Rails 7.0.5.1 (June 26, 2023) ## * No changes. ## Rails 7.0.5 (May 24, 2023) ## * `FormBuilder#id` finds id set by `form_for` and `form_with`. *Matt Polito* * Allow all available locales for template lookups. *Ben Dilley* * Choices of `select` can optionally contain html attributes as the last element of the child arrays when using grouped/nested collections ```erb <%= form.select :foo, [["North America", [["United States","US"],["Canada","CA"]], { disabled: "disabled" }]] %> # => ``` *Chris Gunther* ## Rails 7.0.4.3 (March 13, 2023) ## * Ignore certain data-* attributes in rails-ujs when element is contenteditable [CVE-2023-23913] ## Rails 7.0.4.2 (January 24, 2023) ## * No changes. ## Rails 7.0.4.1 (January 17, 2023) ## * No changes. ## Rails 7.0.4 (September 09, 2022) ## * Guard against `ActionView::Helpers::FormTagHelper#field_name` calls with nil `object_name` arguments. For example: ```erb <%= fields do |f| %> <%= f.field_name :body %> <% end %> ``` *Sean Doyle* * Strings returned from `strip_tags` are correctly tagged `html_safe?` Because these strings contain no HTML elements and the basic entities are escaped, they are safe to be included as-is as PCDATA in HTML content. Tagging them as html-safe avoids double-escaping entities when being concatenated to a SafeBuffer during rendering. Fixes [rails/rails-html-sanitizer#124](https://github.com/rails/rails-html-sanitizer/issues/124) *Mike Dalessio* ## Rails 7.0.3.1 (July 12, 2022) ## * No changes. ## Rails 7.0.3 (May 09, 2022) ## * Ensure models passed to `form_for` attempt to call `to_model`. *Sean Doyle* ## Rails 7.0.2.4 (April 26, 2022) ## * Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`. Escape dangerous characters in names of tags and names of attributes in the tag helpers, following the XML specification. Rename the option `:escape_attributes` to `:escape`, to simplify by applying the option to the whole tag. *Álvaro Martín Fraguas* ## Rails 7.0.2.3 (March 08, 2022) ## * No changes. ## Rails 7.0.2.2 (February 11, 2022) ## * No changes. ## Rails 7.0.2.1 (February 11, 2022) ## * No changes. ## Rails 7.0.2 (February 08, 2022) ## * Ensure `preload_link_tag` preloads JavaScript modules correctly. *Máximo Mussini* * Fix `stylesheet_link_tag` and similar helpers are being used to work in objects with a `response` method. *dark-panda* ## Rails 7.0.1 (January 06, 2022) ## * Fix `button_to` to work with a hash parameter as URL. *MingyuanQin* * Fix `link_to` with a model passed as an argument twice. *Alex Ghiculescu* ## Rails 7.0.0 (December 15, 2021) ## * Support `include_hidden:` option in calls to `ActionView::Helper::FormBuilder#file_field` with `multiple: true` to support submitting an empty collection of files. ```ruby form.file_field :attachments, multiple: true # => form.file_field :attachments, multiple: true, include_hidden: false # => ``` *Sean Doyle* * Fix `number_with_precision(raise: true)` always raising even on valid numbers. *Pedro Moreira* ## Rails 7.0.0.rc3 (December 14, 2021) ## * No changes. ## Rails 7.0.0.rc2 (December 14, 2021) ## * No changes. ## Rails 7.0.0.rc1 (December 06, 2021) ## * Support `fields model: [@nested, @model]` the same way as `form_with model: [@nested, @model]`. *Sean Doyle* * Infer HTTP verb `[method]` from a model or Array with model as the first argument to `button_to` when combined with a block: ```ruby button_to(Workshop.find(1)){ "Update" } #=>
button_to([ Workshop.find(1), Session.find(1) ]) { "Update" } #=> ``` *Sean Doyle* * Support passing a Symbol as the first argument to `FormBuilder#button`: ```ruby form.button(:draft, value: true) # => form.button(:draft, value: true) do content_tag(:strong, "Save as draft") end # => ``` *Sean Doyle* * Introduce the `field_name` view helper, along with the `FormBuilder#field_name` counterpart: ```ruby form_for @post do |f| f.field_tag :tag, name: f.field_name(:tag, multiple: true) # => end ``` *Sean Doyle* * Execute the `ActionView::Base.field_error_proc` within the context of the `ActionView::Base` instance: ```ruby config.action_view.field_error_proc = proc { |html| content_tag(:div, html, class: "field_with_errors") } ``` *Sean Doyle* * Add support for `button_to ..., authenticity_token: false` ```ruby button_to "Create", Post.new, authenticity_token: false # => button_to "Create", Post.new, authenticity_token: true # => button_to "Create", Post.new, authenticity_token: "secret" # => ``` *Sean Doyle* * Support rendering ` %> *Sean Doyle* * Change `ActionView::Helpers::UrlHelper#button_to` to *always* render a `