forked from pollingj/formtastic
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
:datetime, :date and :time selects now support a :default option in f…
…avour of a deprecated :selected option (issue formtastic#152): * if the object has a value, we should pre-select that at all times, ignoring the :default option * if the object has no value, and :default is provided as a Date/Time then :default should be pre-selected * if the object has no value, and :default is provided as nil then no option should be pre-selected (it will default to the first) * if the object has no value, and :default is not provided then fallback to Time.now (or perhaps a configurable default) * :selected invokes a deprecation warning, but is an alias of :default * it's not a real deprecation, as the behaviour has changed with all the bugs and half-fixes
- Loading branch information
1 parent
0dafaf1
commit 326b556
Showing
5 changed files
with
198 additions
and
134 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.