Skip to content

Commit e560b5f

Browse files
committed
Fix #1589
Asciidoctor now fails if a template dir is passed but the dir does not actually exist. Rails has changed the semantic of active records'destroy_all. This should hopefully fix #1589
1 parent 7987e25 commit e560b5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/tasks/book2.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ def genbook(code, &get_content)
8383
# revert internal links decorations for ebooks
8484
content.gsub!(/<<.*?\#(.*?)>>/, "<<\\1>>")
8585

86-
asciidoc = Asciidoctor::Document.new(content, template_dir: template_dir, attributes: { "lang" => code})
86+
asciidoc = Asciidoctor::Document.new(content, attributes: { "lang" => code})
8787
html = asciidoc.render
8888
alldoc = Nokogiri::HTML(html)
8989
number = 1
9090

91-
Book.destroy_all(edition: 2, code: code)
91+
Book.where(edition: 2, code: code).destroy_all
9292
book = Book.create(edition: 2, code: code)
9393

9494
alldoc.xpath("//div[@class='sect1']").each_with_index do |entry, index|

0 commit comments

Comments
 (0)