Skip to content

Instantly share code, notes, and snippets.

@lachie
Created August 13, 2008 02:07
Show Gist options
  • Save lachie/5179 to your computer and use it in GitHub Desktop.
Save lachie/5179 to your computer and use it in GitHub Desktop.
def self.next(username)
list = find(:all,:order => 'last_name')
list[list.index {|u| u.username == username}+1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment