From 9ee0a5740089ee1c344406c197b4bd2b6f5123f0 Mon Sep 17 00:00:00 2001 From: Nate Pinsky Date: Sat, 1 Aug 2020 19:59:06 -0700 Subject: [PATCH] Add source argument to Handler for compatibility with Rails 6+ cf. https://github.com/rails/rails/pull/35119 --- lib/markdown-rails/engine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/markdown-rails/engine.rb b/lib/markdown-rails/engine.rb index 5e411df..e9b8ffc 100644 --- a/lib/markdown-rails/engine.rb +++ b/lib/markdown-rails/engine.rb @@ -7,9 +7,9 @@ class Handler def initialize end - def call(template) + def call(template, source = template.source) # Return Ruby code that returns the compiled template - MarkdownRails.renderer.call(template.source).inspect + '.html_safe' + MarkdownRails.renderer.call(source).inspect + '.html_safe' end end