Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. def all_checkouts
  2. # here we are saving the current users books in a variable
  3. # and iterating over it and displaying each book
  4. books = @current_user.books
  5. books.each do |book|
  6. puts "Title: #{book[:title]}".colorize(:light_blue)
  7. puts " Author: #{book[:author]}"
  8. puts " Category: #{book[:category]}"
  9. puts " Page Count: #{book[:page_count]}"
  10. puts "----------------"
  11. end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement