Class: ActiveSupport::TimeZone
- Inherits:
-
Object
- Object
- ActiveSupport::TimeZone
- Defined in:
- lib/mark_facets/rails/time_zones.rb
Class Method Summary collapse
Class Method Details
.all_with_us_first ⇒ Object
5 6 7 8 9 |
# File 'lib/mark_facets/rails/time_zones.rb', line 5 def all_with_us_first zones = [ActiveSupport::TimeZone.us_zones.dup].flatten ActiveSupport::TimeZone.all.each {|z| zones << z unless zones.include?(z)} return zones end |
.options_for_select ⇒ Object
11 12 13 |
# File 'lib/mark_facets/rails/time_zones.rb', line 11 def ActiveSupport::TimeZone.all_with_us_first.collect{|x| [x.to_s, x.name]} end |