class ActiveRecord::Result

def last(n = nil)

Returns the last record from the rows collection.
def last(n = nil)
  n ? hash_rows.last(n) : hash_rows.last
end