Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

Mark Holmberg's Profile

GitHub User: mark-d-holmberg


Comments by Mark Holmberg


Simple Form needs to submit the name of the zone, not the default to_s value. To do that, try the following in the form:

= f.input :time_zone, collection: { |zone| [,] }, selected: @company.time_zone.nil? ? : @company.time_zone

In the model I only validate against US time zones in the following fashion:

validates :time_zone,
    inclusion: { in: }

THANK YOU! I wrote my college Software Engineering project using the old version of this video, and this new approach makes it so much simpler! Keep them coming.


If you use bootstrap-sass gem, does it have the same generators and what not as the twitter-bootstrap-rails gem?