Guest User

Untitled

a guest
May 20th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def validate
  2. books = Book.find_all_by_title(title)
  3. books.each { |book| errors.add_to_base("this book already exists!") if book.authors == authors } if !books.blank?
  4. errors.empty?
  5. end
Add Comment
Please, Sign In to add comment