k0kubun / hamlit

High Performance Haml Implementation
https://rubygems.org/gems/hamlit
Other
981 stars 59 forks source link

Fix deprecation warning on Rails 6 #138

Closed r7kamura closed 5 years ago

r7kamura commented 5 years ago

When trying rails 6.0.0.beta3 with hamlit 2.9.2, I found a following deprecation warning:

DEPRECATION WARNING: Single arity template handlers are deprecated.  Template handlers must
now accept two parameters, the view object and the source for the view object.
Change:
  >> Hamlit::RailsTemplate#call(template)
To:
  >> Hamlit::RailsTemplate#call(template, source)

This pull request brings hamlit template handler up to work with Rails 6 and no deprecation warnings.

See also: