aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/CHANGELOG.md
diff options
context:
space:
mode:
authorAndriel Nuernberg <andriel.nuernberg@plataformatec.com.br>2013-12-01 04:50:21 -0200
committerAndriel Nuernberg <andriel.nuernberg@plataformatec.com.br>2013-12-05 20:27:38 -0200
commitec19c77ca570919a78efcf2a801863e0eefe98c3 (patch)
tree2417a41c2bd7d0bf0c38a53701e49d2cb1d1d6e8 /actionview/CHANGELOG.md
parentb372690b786c639d17a5e4c1d40459fbed89f878 (diff)
downloadrails-ec19c77ca570919a78efcf2a801863e0eefe98c3.tar.gz
rails-ec19c77ca570919a78efcf2a801863e0eefe98c3.tar.bz2
rails-ec19c77ca570919a78efcf2a801863e0eefe98c3.zip
Label only accepts `:index` and `:namespace` attributes from the input
Diffstat (limited to 'actionview/CHANGELOG.md')
-rw-r--r--actionview/CHANGELOG.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index 9e58c193b1..b95ef0e478 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -1,3 +1,28 @@
+* Label tags generated by collection helpers only inherit the `:index` and
+ `:namespace` from the input, because only these attributes modifies the
+ `for` attribute of the label. Also, the input attributes don't have
+ precedence over the label attributes anymore.
+
+ Before:
+
+ collection = [[1, true, { class: 'foo' }]]
+ f.collection_check_boxes :options, collection, :second, :first do |b|
+ b.label(class: 'my_custom_class')
+ end
+
+ # => <label class="foo" for="user_active_true">1</label>
+
+ After:
+
+ collection = [[1, true, { class: 'foo' }]]
+ f.collection_check_boxes :options, collection, :second, :first do |b|
+ b.label(class: 'my_custom_class')
+ end
+
+ # => <label class="my_custom_class" for="user_active_true">1</label>
+
+ *Andriel Nuernberg*
+
* Fixed a long-standing bug in `json_escape` that causes quotation marks to be stripped.
This method also escapes the \u2028 and \u2029 unicode newline characters which are
treated as \n in JavaScript. This matches the behaviour of the AS::JSON encoder. (The