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

Ticket #5956 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 2 years ago

Add score method to the numeric extensions in ActiveSupport

Reported by: ralree@gmail.com Assigned to: David
Priority: normal Milestone:
Component: ActiveSupport Version:
Severity: normal Keywords: score
Cc:

Description

Now, you can do this:

irb(main):004:0> 1.score
=> 631152000

This equates to 20.years as per this. The patch is attached and tested:

423 tests, 1530 assertions, 0 failures, 0 errors

This patch follows in the footsteps of the fortnight method, bringing the possibility of (4.score + 7.years).ago into the realm of possibility.

Attachments

numeric_score_mod.diff (1.0 kB) - added by ralree@gmail.com on 08/29/06 08:43:32.
Diff with patch to time.rb and test.

Change History

08/29/06 08:43:32 changed by ralree@gmail.com

  • attachment numeric_score_mod.diff added.

Diff with patch to time.rb and test.

08/29/06 10:50:08 changed by bitsweat

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

Pluginize - not of general use.

08/31/06 07:05:03 changed by anonymous

and fortnight is of general use?