Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def all_checkouts
- # here we are saving the current users books in a variable
- # and iterating over it and displaying each book
- books = @current_user.books
- books.each do |book|
- puts "Title: #{book[:title]}".colorize(:light_blue)
- puts " Author: #{book[:author]}"
- puts " Category: #{book[:category]}"
- puts " Page Count: #{book[:page_count]}"
- puts "----------------"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement