Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #59 (closed defect: worksforme)

Opened 4 years ago

Last modified 4 years ago

Bustination in date helper

Reported by: Scott Barron Assigned to: David
Priority: normal Milestone: 0.9
Component: ActionPack Version: 0.8
Severity: normal Keywords:
Cc:

Description

Unless you pass start_year and end_year to date_select, you cannot pass include_blank as an option. If you do, bustination occurs. I believe the problem to be in select_year, if include_blank is set to true it's using 0 as the date to pass around to the other functions. select_year really doesn't seem to deal with this well. Even using the examples from the API docs will cause explosive errors to occur. I'll also note that date_select is not tested in the unit tests. Watch this space for further developments, until then all hell will break loose in your browser should you try to include_blank with date_select!

Attachments

date_helper.diff (0.8 kB) - added by what-a-day on 12/14/04 02:14:38.
date_helper_test.diff (12.1 kB) - added by what-a-day on 12/14/04 02:15:03.

Change History

12/14/04 02:14:38 changed by what-a-day

  • attachment date_helper.diff added.

12/14/04 02:15:03 changed by what-a-day

  • attachment date_helper_test.diff added.

12/14/04 02:18:26 changed by what-a-day

  • status changed from new to closed.
  • version changed from 0.7 to 0.8.
  • resolution set to worksforme.
  • milestone changed from 0.8 to 0.9.

So this mends up the "bustination" reported when passing nil as a date and omitting a :end_year. As per Scott's request, I've added some tests to cover this scenario.