## Rails 7.0.0.alpha1 (September 15, 2021) ## * Improves the performance of ActionView::Helpers::NumberHelper formatters by avoiding the use of exceptions as flow control. *Mike Dalessio* * `preload_link_tag` properly inserts `as` attributes for files with `image` MIME types, such as JPG or SVG. *Nate Berkopec* * Add `weekday_options_for_select` and `weekday_select` helper methods. Also adds `weekday_select` to `FormBuilder`. *Drew Bragg*, *Dana Kashubeck*, *Kasper Timm Hansen* * Add `caching?` helper that returns whether the current code path is being cached and `uncacheable!` to denote helper methods that can't participate in fragment caching. *Ben Toews*, *John Hawthorn*, *Kasper Timm Hansen*, *Joel Hawksley* * Add `include_seconds` option for `time_field`. <%= form.time_field :foo, include_seconds: false %> # => Default includes seconds: <%= form.time_field :foo %> # => This allows you to take advantage of [different rendering options](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#time_value_format) in some browsers. *Alex Ghiculescu* * Improve error messages when template file does not exist at absolute filepath. *Ted Whang* * Add `:country_code` option to `sms_to` for consistency with `phone_to`. *Jonathan Hefner* * OpenSSL constants are now used for Digest computations. *Dirkjan Bussink* * The `translate` helper now passes `default` values that aren't translation keys through `I18n.translate` for interpolation. *Jonathan Hefner* * Adds option `extname` to `stylesheet_link_tag` to skip default `.css` extension appended to the stylesheet path. Before: ```ruby stylesheet_link_tag "style.less" # ``` After: ```ruby stylesheet_link_tag "style.less", extname: false, skip_pipeline: true, rel: "stylesheet/less" # ``` *Abhay Nikam* * Deprecate `render` locals to be assigned to instance variables. *Petrik de Heus* * Remove legacy default `media=screen` from `stylesheet_link_tag`. *André Luis Leal Cardoso Junior* * Change `ActionView::Helpers::FormBuilder#button` to transform `formmethod` attributes into `_method="$VERB"` Form Data to enable varied same-form actions: <%= form_with model: post, method: :put do %> <%= form.button "Update" %> <%= form.button "Delete", formmethod: :delete %> <% end %> <%# =>
%> *Sean Doyle* * Change `ActionView::Helpers::UrlHelper#button_to` to *always* render a `