This project is archived and is in readonly mode.
select_datetime: Documentation or Implementation Bug
-
apeiros
A possible fix for 2.1 (cleaned up the other code too a bit) is attached.
-
Pratik
- Assigned user set to Pratik
- State changed from new to hold
- Tag changed from actionpack, datehelper, helper to actionpack, datehelper, helper
-
CancelProfileIsBroken
- State changed from hold to open
- Tag changed from actionpack, datehelper, helper to actionpack, bugmash, datehelper, helper
-
Rizwan Reza
verified
+1 This error is happening in 2-3-stable and master.
-
José Valim
- State changed from stale to invalid
-
José Valim
- State changed from invalid to new
Since Rizwan reported he could verify it, I'm reopening.
-
Rizwan Reza
- Assigned user changed from Pratik to José Valim
- Tag changed from actionpack, bugmash, datehelper, helper to actionpack, bug, bugmash, datehelper, helper
verified
+1 This error is still happening on edge. By glancing at date_helper.rb, I can see that there is some mechanism to tackle separators, but it's not working.
This works:
select_datetime()But this does not:
select_datetime(:date_separator => '/')Unfortunately, I can't understand the underlying code. The patch is not working as well.
-
Matt Duncan
- Assigned user changed from José Valim to Pratik
- Tag changed from actionpack, bug, bugmash, datehelper, helper to actionpack, bugmash, datehelper, helper
Not Reproducible.
The following tests in actionpack/test/template/date_helper_test.rb (2-3-stable and master) all use the :datetime_separator option:
- test_select_datetime_with_separators
- test_select_datetime_with_all_separators
- test_datetime_select_with_separators
-
Matt Duncan
- Assigned user changed from Pratik to José Valim
- Tag changed from actionpack, bugmash, datehelper, helper to actionpack, bug, bugmash, datehelper, helper
Fixing Rizwan's user/tag changes that got overwritten with my comment.
-
Rizwan Reza
While creating a test case. I encountered this:
select_datetime(Time.now, {:datetime_separator => "—"})This is working. The main confusion is that when this works:
select_datetime()How can this not?
select_datetime({:datetime_separator => "—"})Conclusion: The first argument is necessary for separators to work.
No bug here. :)
-
José Valim
- State changed from new to invalid
-
CancelProfileIsBroken
- Assigned user cleared.
- Tag changed from actionpack, bug, bugmash, datehelper, helper to actionpack, bug, datehelper, helper
- Milestone cleared.
