SHARE
TWEET

Untitled

a guest Jun 24th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top