class Formtastic::Inputs::TimeZoneInput
This is the default input choice for attributes matching /time_zone/, but can be applied to any text-like input with `:as => :time_zone`.
@example Full form context and output
<%= semantic_form_for(@user) do |f| %> <%= f.inputs do %> <%= f.input :time_zone, :as => :time_zone %> <% end %> <% end %> <form...> <fieldset> <ol> <li class="time_zone"> <label for="user_time_zone">Time zone</label> <input type="text" id="user_time_zone" name="user[time_zone]"> </li> </ol> </fieldset> </form>
@see Formtastic::Helpers::InputsHelper#input InputsHelper#input for full documentation of all possible options.
@todo document :priority_zones option @todo configurable default :priority_zones?
Public Instance Methods
priority_zones()
click to toggle source
# File lib/formtastic/inputs/time_zone_input.rb, line 43 def priority_zones options[:priority_zones] || [] # TODO config? end
to_html()
click to toggle source
# File lib/formtastic/inputs/time_zone_input.rb, line 36 def to_html input_wrapping do label_html << builder.time_zone_select(method, priority_zones, input_options, input_html_options) end end