method
time_zone_select
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {})
public
Return select and option tags for the given object and method, using #time_zone_options_for_select to generate the list of option tags.
In addition to the :include_blank option documented above, this method also supports a :model option, which defaults to TimeZone. This may be used by users to specify a different time zone model object. (See #time_zone_options_for_select for more information.)
Register or
log in
to add new notes.
erik -
December 24, 2008 - (>= v2.2.1)
![Default_avatar_30](https://www.gravatar.com/avatar/8d0371460c58706c26641f3d578145aa?default=http://apidock.com/images/default_avatar_30.png&size=30)
5 thanks
uninitialized constant ActionView::Base::CompiledTemplates::TimeZone
If you get this error, you need to use ActiveSupport::TimeZone.us_zones instead of TimeZone.us_zones.
Example:
<%= form.time_zone_select(:time_zone, ActiveSupport::TimeZone.us_zones) %>