diff options
Diffstat (limited to 'actionview/CHANGELOG.md')
-rw-r--r-- | actionview/CHANGELOG.md | 201 |
1 files changed, 32 insertions, 169 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index 8ac74dc938..5557285ef5 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,193 +1,56 @@ -* Changed the meaning of `render "foo/bar"`. - - Previously, calling `render "foo/bar"` in a controller action is equivalent - to `render file: "foo/bar"`. In Rails 4.2, this has been changed to mean - `render template: "foo/bar"` instead. If you need to render a file, please - change your code to use the explicit form (`render file: "foo/bar"`) instead. - - *Jeremy Jackson* - -* Add support for ARIA attributes in tags. - - Example: - - <%= f.text_field :name, aria: { required: "true", hidden: "false" } %> - - now generates: - - <input aria-hidden="false" aria-required="true" id="user_name" name="user[name]" type="text"> - - *Paola Garcia Casadiego* - -* Provide a `builder` object when using the `label` form helper in block form. - - The new `builder` object responds to `translation`, allowing I18n fallback support - when you want to customize how a particular label is presented. - - *Alex Robbin* - -* Add I18n support for input/textarea placeholder text. - - Placeholder I18n follows the same convention as `label` I18n. - - *Alex Robbin* - -* Fix that render layout: 'messages/layout' should also be added to the dependency tracker tree. - - *DHH* - -* Add `PartialIteration` object used when rendering collections. - - The iteration object is available as the local variable - `#{template_name}_iteration` when rendering partials with collections. - - It gives access to the `size` of the collection being iterated over, - the current `index` and two convenience methods `first?` and `last?`. - - *Joel Junström*, *Lucas Uyezu* - -* Return an absolute instead of relative path from an asset url in the case - of the `asset_host` proc returning nil. - - *Jolyon Pawlyn* - -* Fix `html_escape_once` to properly handle hex escape sequences (e.g. ᨫ). - - *John F. Douthat* - -* Added String support for min and max properties for date field helpers. +* Extracted `ActionView::Helpers::RecordTagHelper` to external gem + (`record_tag_helper`) and added removal notices. *Todd Bealmear* -* The `highlight` helper now accepts a block to be used instead of the `highlighter` - option. - - *Lucas Mazza* - -* The `except` and `highlight` helpers now accept regular expressions. - - *Jan Szumiec* - -* Flatten the array parameter in `safe_join`, so it behaves consistently with - `Array#join`. - - *Paul Grayson* - -* Honor `html_safe` on array elements in tag values, as we do for plain string - values. - - *Paul Grayson* - -* Add `ActionView::Template::Handler.unregister_template_handler`. - - It performs the opposite of `ActionView::Template::Handler.register_template_handler`. - - *Zuhao Wan* - -* Bring `cache_digest` rake tasks up-to-date with the latest API changes. - - *Jiri Pospisil* - -* Allow custom `:host` option to be passed to `asset_url` helper that - overwrites `config.action_controller.asset_host` for particular asset. - - *Hubert Łępicki* - -* Deprecate `AbstractController::Base.parent_prefixes`. - Override `AbstractController::Base.local_prefixes` when you want to change - where to find views. - - *Nick Sutterer* - -* Take label values into account when doing I18n lookups for model attributes. - - The following: - - # form.html.erb - <%= form_for @post do |f| %> - <%= f.label :type, value: "long" %> - <% end %> - - # en.yml - en: - activerecord: - attributes: - post/long: "Long-form Post" - - Used to simply return "long", but now it will return "Long-form - Post". - - *Joshua Cody* - -* Change `asset_path` to use File.join to create proper paths: - - Before: - - https://some.host.com//assets/some.js - - After: - - https://some.host.com/assets/some.js - - *Peter Schröder* - -* Change `favicon_link_tag` default mimetype from `image/vnd.microsoft.icon` to - `image/x-icon`. - - Before: - - # => favicon_link_tag 'myicon.ico' - <link href="/assets/myicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" /> - - After: - - # => favicon_link_tag 'myicon.ico' - <link href="/assets/myicon.ico" rel="shortcut icon" type="image/x-icon" /> +* Allow to pass a string value to `size` option in `image_tag` and `video_tag`. - *Geoffroy Lorieux* + This makes the behavior more consistent with `width` or `height` options. -* Remove wrapping div with inline styles for hidden form fields. + *Mehdi Lahmam* - We are dropping HTML 4.01 and XHTML strict compliance since input tags directly - inside a form are valid HTML5, and the absence of inline styles help in validating - for Content Security Policy. +* Partial template name does no more have to be a valid Ruby identifier. - *Joost Baaij* + There used to be a naming rule that the partial name should start with + underscore, and should be followed by any combination of letters, numbers + and underscores. + But now we can give our partials any name starting with underscore, such as + _🍔.html.erb. -* `collection_check_boxes` respects `:index` option for the hidden field name. + *Akira Matsuda* - Fixes #14147. +* Change the default template handler from `ERB` to `Raw`. - *Vasiliy Ermolovich* + Files without a template handler in their extension will be rendered using the raw + handler instead of ERB. -* `date_select` helper with option `with_css_classes: true` does not overwrite other classes. + *Rafael Mendonça França* - *Izumi Wong-Horiuchi* +* Remove deprecated `AbstractController::Base::parent_prefixes`. -* `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY` - as input. + *Rafael Mendonça França* - Fixes #14405. +* Default translations that have a lower precedence than a html safe default, + but are not themselves safe, should not be marked as html_safe. - *Yves Senn* + *Justin Coyne* -* Add `include_hidden` option to `collection_check_boxes` helper. +* Make possible to use blocks with short version of `render "partial"` helper. - *Vasiliy Ermolovich* + *Nikolay Shebanov* -* Fixed a problem where the default options for the `button_tag` helper are not - applied correctly. +* Add a `hidden_field` on the `file_field` to avoid raise a error when the only + input on the form is the `file_field`. - Fixes #14254. + *Mauro George* - *Sergey Prikhodko* +* Add an explicit error message, in `ActionView::PartialRenderer` for partial + `rendering`, when the value of option `as` has invalid characters. -* Take variants into account when calculating template digests in ActionView::Digestor. + *Angelo Capilleri* - The arguments to ActionView::Digestor#digest are now being passed as a hash - to support variants and allow more flexibility in the future. The support for - regular (required) arguments is deprecated and will be removed in Rails 5.0 or later. +* Allow entries without a link tag in AtomFeedHelper. - *Piotr Chmolowski, Łukasz Strzałkowski* + *Daniel Gomez de Souza* -Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionview/CHANGELOG.md) for previous changes. +Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionview/CHANGELOG.md) for previous changes. |