fix timezone selector
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<%= ff.select :timezone, nil, {}, class: 'base-select' do %>
|
<%= ff.select :timezone, nil, {}, class: 'base-select' do %>
|
||||||
<% tzinfo = TZInfo::Timezone.get(ActiveSupport::TimeZone::MAPPING[current_account.timezone] || current_account.timezone) %>
|
<% tzinfo = TZInfo::Timezone.get(ActiveSupport::TimeZone::MAPPING[current_account.timezone] || current_account.timezone) %>
|
||||||
<% items = ActiveSupport::TimeZone.all.map { |z| [z.to_s, z.name] } %>
|
<% items = ActiveSupport::TimeZone.all.map { |z| [z.to_s, z.name] } %>
|
||||||
<% items.unshift(tzinfo) unless ActiveSupport::TimeZone.all.find { |e| e.tzinfo == tzinfo } %>
|
<% items.unshift([tzinfo.to_s, current_account.timezone]) unless ActiveSupport::TimeZone.all.find { |e| e.tzinfo == tzinfo } %>
|
||||||
<%= options_for_select(items, current_account.timezone) %>
|
<%= options_for_select(items, current_account.timezone) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user