Skip to content

Commit

Permalink
Fix deprecation warning on Rails 6
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed Apr 9, 2019
1 parent f9951f0 commit 21527f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/hamlit/rails_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def set_options(opts)
end
end

def call(template)
def call(template, source = nil)
source ||= template.source
options = RailsTemplate.options

# https://github.com/haml/haml/blob/4.0.7/lib/haml/template/plugin.rb#L19-L20
Expand All @@ -32,7 +33,7 @@ def call(template)
options = options.merge(format: :xhtml)
end

Engine.new(options).call(template.source)
Engine.new(options).call(source)
end

def supports_streaming?
Expand Down

0 comments on commit 21527f8

Please sign in to comment.