validation - Issue validating user time zone for Rails app on Heroku -


i'm following ryan bates' tutorial on adding time zones rails app.

http://railscasts.com/episodes/106-time-zones-revised

(it's tutorial, way)

anyway, ryan says it's idea validate submitted time zone ones rails knows about. put rule users' model:

validates_inclusion_of :time_zone, in: activesupport::timezone.zones_map(&:name) 

that works fine in development. however, when run app on heroku, not timezone "melbourne" (and many others - i'm testing au time zones).

on heroku, rule in user model, not accept time zone of "melbourne".

why be? time_zone_select view helper returns "melbourne" - rails must aware of it.


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -