Last active
February 13, 2016 00:15
-
-
Save davetapley/521bc7357f42a056af3c to your computer and use it in GitHub Desktop.
ActiveSupport::Duration in select
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> @store.start_of_day == 0.hours | |
=> true | |
>> options_for_select([['foo', 0.hours]], @store.start_of_day) | |
=> "<option value=\"0\">foo</option>" | |
>> options_for_select([['foo', 0.hours]], 0.hours) | |
=> "<option selected=\"selected\" value=\"0\">foo</option>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment