Вставьте один класс css для выбора в Rails date_select

Я использую метод date_select для генерации 3 вариантов html: день, месяц и год. Но мне нужно, чтобы каждый выбор имел один класс CSS.

Я не нашел в документации, как передать параметры помощнику, я пробовал несколько способов и ничего.

Rails View:

<%= f.date_select :birthday, :order => [:day, :month, :year], :start_year => 1910, :end_year => 2012, :html => {:class => ['day', 'month', 'year']} %>

HTML-вывод:

<select id="poll_user_birthday_3i" name="poll_user[birthday(3i)]">
<select id="poll_user_birthday_2i" name="poll_user[birthday(2i)]">
<select id="poll_user_birthday_1i" name="poll_user[birthday(1i)]">

HTML-вывод, как я:

<select id="poll_user_birthday_3i" name="poll_user[birthday(3i)]" class="day">
<select id="poll_user_birthday_2i" name="poll_user[birthday(2i)]" class="month">
<select id="poll_user_birthday_1i" name="poll_user[birthday(1i)]" class="year">

Спасибо!

7
задан Hugo Demiglio 5 April 2012 в 15:21
поделиться