Reputation: 10825
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 in db sqlite?
Upvotes: 2
Views: 587
Reputation: 10825
Works without any collection
= f.time_zone_select :time_zone
Upvotes: 1
Reputation: 21
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>
Upvotes: 2