bug report

I assume this is a bug with find :last?


=> #<Program id: 888, name: "Post-... deleted_reason: nil> # worked

capella.ps.find :last

ActiveRecord::RecordNotFound: Couldn't find Program with ID=6329 AND
(programs.school_id = 6)
  from (irb):7

Before I submit it wanted to check.


Nope it's because you're running rails 2.0.2, which doesn't have
find :last.
capella.ps.last works but that's an array.last (ie the same as
[1,2,3,4].last: it's loading the whole array and then returning the
last element


Instead, do

capella.ps.find :first, :order => "id DESC"

Which item is "last" in a SQL query depends on what you're ordering the
query on, so you could use created_at or something else instead of id.