Question

Is there a way to specify CSS class on time_zone select helper. I have the code like -

f.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones

Was it helpful?

Solution

time_zone_select(:time_zone, ActiveSupport::TimeZone.us_zones, {}, {:class => 'css-class-name'}) 

http://api.rubyonrails.org/classes/ActionView/Helpers/FormBuilder.html#method-i-time_zone_select

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top