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

Ticket #6865 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

[PATCH] minor bug with date_helper.rb

Reported by: esceo Assigned to: core
Priority: normal Milestone: 1.x
Component: ActionPack Version: edge
Severity: normal Keywords: date_select
Cc: bdimchef-rails@wieldim.com

Description

in edge rails (1.2.0), null date yields the current date in a date_select with include_blank. digged into the code a bit,

date_helper.rb has the following line

datetime = Time.now if options[:include_blank]

shoudln't this have been?

datetime = Time.now unless options[:include_blank]

does that meet the spec of include_blank?

Attachments

6865.patch (0.5 kB) - added by moofbong on 12/20/06 15:25:01.
patch

Change History

12/20/06 15:25:01 changed by moofbong

  • attachment 6865.patch added.

patch

12/20/06 15:25:31 changed by moofbong

  • version set to edge.
  • summary changed from minor bug with date_helper.rb to [PATCH] minor bug with date_helper.rb.

I'm having the same issue. Switching the if to unless fixes the problem.

12/20/06 15:29:23 changed by moofbong

  • cc set to bdimchef-rails@wieldim.com.

12/20/06 18:21:54 changed by ludo

I've reported this several days ago in #6812. The solution is indeed really simple, would love to see this fixed soon :)

10/06/07 16:58:05 changed by mikong

  • status changed from new to closed.
  • resolution set to fixed.

As noted by Josh in #6812, it is already fixed in the current edge (revision 7760 as of writing).