开发者

Selectbox with Timezones in Rails 3.1

I want to make selectbox like this with simple_form (but it doesn't matter I think). I found that in Rails 2.1 was object TimeZone.us_zones but now it doesn't work neither Time.zone.all or smth. The line example for simple_form:

  = f.time_zone :time_zone, TimeZone.us_zones

And I should have a time_zone field string format i开发者_如何学编程n db sqlite?


Maybe this can be helpful as well

<li> <%= f.label :time_zone %><%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones, :class => :timezone %> </li>


Works without any collection

  = f.time_zone_select :time_zone
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜