Check If ActiveRecord Update Fails
unless book.update(book_params)
log_book_update_failed(id: book.id)
endbegin
book.update!(book_params)
rescue ActiveRecord::ActiveRecordError
log_book_update_failed(id: book.id)
endLast updated
unless book.update(book_params)
log_book_update_failed(id: book.id)
endbegin
book.update!(book_params)
rescue ActiveRecord::ActiveRecordError
log_book_update_failed(id: book.id)
endLast updated