aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-04-20 01:26:11 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-04-20 01:26:11 -0300
commitff82d7001fb9a4239d9a52d6af4f6d5bb056cc23 (patch)
tree7d96f5675142b337792ecef75056ceeeabbd73a4 /actionview/CHANGELOG.md
parent6d83ed71295e38afe332ecad51f686513eeb99cf (diff)
parentd7b60544960399fd589770364c3e81a866593324 (diff)
downloadrails-ff82d7001fb9a4239d9a52d6af4f6d5bb056cc23.tar.gz
rails-ff82d7001fb9a4239d9a52d6af4f6d5bb056cc23.tar.bz2
rails-ff82d7001fb9a4239d9a52d6af4f6d5bb056cc23.zip
Merge pull request #24225 from neumayr/date_select_helper_with_css_classes_accept_hash
date_select helper with_css_classes option also accept a hash
Diffstat (limited to 'actionview/CHANGELOG.md')
-rw-r--r--actionview/CHANGELOG.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index a352e5914e..6fb41e9d4c 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -1,3 +1,19 @@
+* `date_select` helper `:with_css_classes` option now accepts a hash of strings
+ for `:year`, `:month`, `:day`, `:hour`, `:minute`, `:second` that will extend
+ the select type with the given css class value.
+
+ ```erb
+ <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" } %>
+ ```
+
+ ```html
+ <select id="user_birthday_3i" name="user[birthday(3i)]">…</select>
+ <select id="user_birthday_2i" name="user[birthday(2i)]" class="my-month">…</select>
+ <select id="user_birthday_1i" name="user[birthday(1i)]" class="my-year">…</select>
+ ```
+
+ *Matthias Neumayr*
+
* Add `to_sentence` helper that is a HTML-safe aware version of `Array#to_sentence`.
*Neil Matatall*