diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-06-27 20:33:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-27 20:33:04 +0200 |
commit | 5ce304af9691371129d7a0c03e0e32c06f242c5e (patch) | |
tree | 544fab93937e39f8b6c4219a0091cb701fc6535c /actionview/CHANGELOG.md | |
parent | ffded19faf497c0a0bb392c07f98d9eee62f6925 (diff) | |
parent | a65a3bde0bee7d3d28c30775ec955260ed61e96c (diff) | |
download | rails-5ce304af9691371129d7a0c03e0e32c06f242c5e.tar.gz rails-5ce304af9691371129d7a0c03e0e32c06f242c5e.tar.bz2 rails-5ce304af9691371129d7a0c03e0e32c06f242c5e.zip |
Merge pull request #25543 from marekkirejczyk/tag_builder_25195
New syntax for tag helpers i.e. tag.br instead of tag('br') #25195
Diffstat (limited to 'actionview/CHANGELOG.md')
-rw-r--r-- | actionview/CHANGELOG.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index 099842025c..ab4b46c56e 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,3 +1,28 @@ +* New syntax for tag helpers. Avoid positional parameters and support HTML5 by default. + Example usage of tag helpers before: + + ```ruby + tag(:br, nil, true) + content_tag(:div, content_tag(:p, "Hello world!"), class: "strong") + + <%= content_tag :div, class: "strong" do -%> + Hello world! + <% end -%> + ``` + + Example usage of tag helpers after: + + ```ruby + tag.br + tag.div tag.p("Hello world!"), class: "strong" + + <%= tag.div class: "strong" do %> + Hello world! + <% end %> + ``` + + *Marek Kirejczyk*, *Kasper Timm Hansen* + * Change `datetime_field` and `datetime_field_tag` to generate `datetime-local` fields. As a new specification of the HTML 5 the text field type `datetime` will no longer exist |