4.3 KiB
-
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 currentindex
and two convenience methodsfirst?
andlast?
.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 nilJolyon 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.
Todd Bealmear
-
The
highlight
helper now accepts a block to be used instead of thehighlighter
option.Lucas Mazza
-
The
except
andhighlight
helpers now accept regular expressions.Jan Szumiec
-
Flatten the array parameter in
safe_join
, so it behaves consistently withArray#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 changesJiri Pospisil
-
Allow custom
:host
option to be passed toasset_url
helper that overwritesconfig.action_controller.asset_host
for particular asset.Hubert Łępicki
-
Deprecate
AbstractController::Base.parent_prefixes
. OverrideAbstractController::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 fromimage/vnd.microsoft.icon
toimage/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" />
Geoffroy Lorieux
-
Remove wrapping div with inline styles for hidden form fields.
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.
Joost Baaij
-
collection_check_boxes
respects:index
option for the hidden filed name.Fixes #14147.
Vasiliy Ermolovich
-
date_select
helper with optionwith_css_classes: true
does not overwrite other classes.Izumi Wong-Horiuchi
-
number_to_percentage
does not crash withFloat::NAN
orFloat::INFINITY
as input.Fixes #14405.
Yves Senn
-
Add
include_hidden
option tocollection_check_boxes
helper.Vasiliy Ermolovich
-
Fixed a problem where the default options for the
button_tag
helper is not applied correctly.Fixes #14254.
Sergey Prikhodko
-
Take variants into account when calculating template digests in ActionView::Digestor.
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.
Piotr Chmolowski, Łukasz Strzałkowski
Please check 4-1-stable for previous changes.