2020-03-30 16:16:31 -04:00
|
|
|
* `ActionView::Base.annotate_template_file_names` annotates HTML output with template file names.
|
|
|
|
|
|
|
|
*Joel Hawksley*, *Aaron Patterson*
|
|
|
|
|
2019-12-05 17:13:28 -05:00
|
|
|
* `ActionView::Helpers::TranslationHelper#translate` returns nil when
|
|
|
|
passed `default: nil` without a translation matching `I18n#translate`.
|
|
|
|
|
|
|
|
*Stefan Wrobel*
|
|
|
|
|
2019-10-24 16:51:49 -04:00
|
|
|
* `OptimizedFileSystemResolver` prefers template details in order of locale,
|
|
|
|
formats, variants, handlers.
|
|
|
|
|
|
|
|
*Iago Pimenta*
|
|
|
|
|
2019-12-11 11:20:38 -05:00
|
|
|
* Added `class_names` helper to create a CSS class value with conditional classes.
|
|
|
|
|
|
|
|
*Joel Hawksley*, *Aaron Patterson*
|
|
|
|
|
2019-12-03 13:18:01 -05:00
|
|
|
* Add support for conditional values to TagBuilder.
|
|
|
|
|
|
|
|
*Joel Hawksley*
|
2019-12-11 11:20:38 -05:00
|
|
|
|
`ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected
```ruby
@post = Post.new
@post.category = nil
# Before
select("post", "category", none: nil, programming: 1, economics: 2)
# =>
# <select name="post[category]" id="post_category">
# <option value="">none</option>
# <option value="1">programming</option>
# <option value="2">economics</option>
# </select>
# After
select("post", "category", none: nil, programming: 1, economics: 2)
# =>
# <select name="post[category]" id="post_category">
# <option selected="selected" value="">none</option>
# <option value="1">programming</option>
# <option value="2">economics</option>
# </select>
```
To get the same result without these changes we can set `:selected` as `@post.category.to_s`:
```ruby
select("post", "category", {none: nil, programming: 1, economics: 2}, {selected: @post.category.to_s}
```
2018-12-27 11:18:32 -05:00
|
|
|
* `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
@post = Post.new
|
|
|
|
@post.category = nil
|
|
|
|
|
|
|
|
# Before
|
|
|
|
select("post", "category", none: nil, programming: 1, economics: 2)
|
|
|
|
# =>
|
|
|
|
# <select name="post[category]" id="post_category">
|
|
|
|
# <option value="">none</option>
|
|
|
|
# <option value="1">programming</option>
|
|
|
|
# <option value="2">economics</option>
|
|
|
|
# </select>
|
|
|
|
|
|
|
|
# After
|
|
|
|
select("post", "category", none: nil, programming: 1, economics: 2)
|
|
|
|
# =>
|
|
|
|
# <select name="post[category]" id="post_category">
|
|
|
|
# <option selected="selected" value="">none</option>
|
|
|
|
# <option value="1">programming</option>
|
|
|
|
# <option value="2">economics</option>
|
|
|
|
# </select>
|
|
|
|
```
|
|
|
|
|
|
|
|
*bogdanvlviv*
|
|
|
|
|
2019-08-25 14:39:58 -04:00
|
|
|
* Log lines for partial renders and started template renders are now
|
|
|
|
emitted at the `DEBUG` level instead of `INFO`.
|
|
|
|
|
|
|
|
Completed template renders are still logged at the `INFO` level.
|
|
|
|
|
|
|
|
*DHH*
|
|
|
|
|
2019-05-14 00:09:39 -04:00
|
|
|
* ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
|
|
|
|
|
|
|
|
*Juanito Fatas*
|
|
|
|
|
2019-11-23 19:20:00 -05:00
|
|
|
* Added `phone_to` helper method to create a link from mobile numbers.
|
2019-07-26 14:54:57 -04:00
|
|
|
|
|
|
|
*Pietro Moro*
|
|
|
|
|
2019-06-21 15:04:28 -04:00
|
|
|
* annotated_source_code returns an empty array so TemplateErrors without a
|
|
|
|
template in the backtrace are surfaced properly by DebugExceptions.
|
|
|
|
|
|
|
|
*Guilherme Mansur*, *Kasper Timm Hansen*
|
|
|
|
|
2019-06-19 13:42:52 -04:00
|
|
|
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
|
|
|
|
|
|
|
|
*Guilherme Mansur*, *Gannon McGibbon*
|
|
|
|
|
2019-11-23 19:20:00 -05:00
|
|
|
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
|
2019-05-29 15:03:54 -04:00
|
|
|
|
|
|
|
*Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
|
2019-12-03 13:18:01 -05:00
|
|
|
|
2019-05-22 04:21:59 -04:00
|
|
|
* Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
|
|
|
|
|
|
|
|
*Younes SERRAJ*
|
2019-04-19 12:34:53 -04:00
|
|
|
|
|
|
|
|
2019-04-24 15:57:14 -04:00
|
|
|
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.
|