Skip to content

Instantly share code, notes, and snippets.

@localshred
Created April 22, 2010 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save localshred/374821 to your computer and use it in GitHub Desktop.
Save localshred/374821 to your computer and use it in GitHub Desktop.
# find all the books in the db
books = Book.all
book_names.each do |book_title|
# gets the proper book from the books array
book_record = books.detect{|book| book.name =~ book_title }
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment