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

Ticket #3950 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 2 years ago

[XPATCH] find :last

Reported by: court3nay Assigned to: David
Priority: normal Milestone:
Component: ActiveRecord Version: 1.0.0
Severity: normal Keywords:
Cc: court3nay@gmail.com

Description

Yeah, this is us being lazy again.

User.find :last

as a shortcut for

User.find :first, :order => '{primary_key} desc'

Sure, you might say, why? Pre-emptively, I am using find(:last) more often than I'm using find(:first). And until there's a default_order, if you're going to have find :first, you need find :last too.

Attachments

find_last.diff (1.4 kB) - added by court3nay on 02/24/06 20:53:50.
patch

Change History

02/24/06 20:53:50 changed by court3nay

  • attachment find_last.diff added.

patch

02/24/06 21:03:13 changed by court3nay

  • cc set to court3nay@gmail.com.
  • summary changed from find :last to [XPATCH] find :last.

on second thoughts, disregard for now--- i'm going to have to parse out any ASC/DESC and reverse it, or something. yuk.

05/23/07 19:11:35 changed by josh

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

disregarding...