Skip to content

Commit

Permalink
Merge pull request #138 from r7kamura/feature/rails-6-0
Browse files Browse the repository at this point in the history
Fix deprecation warning on Rails 6
  • Loading branch information
k0kubun committed Apr 9, 2019
2 parents f9951f0 + 21527f8 commit 1614ddb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/hamlit/rails_template.rb
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 1614ddb

Please sign in to comment.