Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Ordinalize Negative Numbers

#6681

This patch fixes the ordinalize method for negative numbers. I added inflector test cases that address this issue and provided a brief example below. This patch changes the ordinalize method to use the absolute value of the number when determining which suffix to append.

Currently:

> -1.ordinalize
=> "-1th"

After patching:

> -1.ordinalize
=> "-1st"

Reported by Amir · April 7th, 2011 @ 09:22 AM

State: committed
Milestone: 3.1
Assigned to: Aaron Patterson Aaron Patterson
Importance: Low

Activity

  1. Jason Noble
    Jason Noble

    This has been moved to Github issues.

    The patch was merged into rails master.

    Thank you for your contributions.

    May 7th, 2011 @ 08:34 PM

  2. Jason Noble
  3. Aaron Patterson
    Aaron Patterson
    • State changed from new to committed
    • Milestone set to 3.1
    • Assigned user set to Aaron Patterson
    • Importance changed from to Low

    This was merged to master, so closing.

    May 7th, 2011 @ 08:36 PM