Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- validates_inclusion_of :time_zone, in: ActiveSupport::TimeZone.zones_map(&:name)
- validates :time_zone,
- inclusion: {
- in: ActiveSupport::TimeZone.zones_map.keys
- }
- validates_inclusion_of :time_zone,
- :in => ActiveSupport::TimeZone.zones_map(&:name).keys,
- :message => "is not a valid time zone"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement