2015-04-21 40 views
-1

紅寶石,my_form.html.erb我有:如何選擇時間選項?

<%= f.input :doors, collection => :00, :15, :30, :45, prompt => "Select the time" %> 

我怎麼去允許用戶選擇在一個小時和分鐘:15個分鐘的間隔?我也使用simple_form。

+0

參考文檔 –

回答

0

答案是minute_step:

<%= f.input :doors, {minute_step: 15}%> 
<%= f.input :showtime, {minute_step: 15} %>