faml
faml copied to clipboard
Fix deprecation warning on Rails 6.0
In Rails 6.0 the API for template handlers is changing, a template handler must now take two arguments [1], the template and the source, otherwise you will see the 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:
>> #<Faml::RailsHandler:0x0000561d54608868>.call(template)
To:
>> #<Faml::RailsHandler:0x0000561d54608868>.call(template, source)
This fixes that deprecation warning.
[1] https://www.github.com/rails/rails/commit/28f88e0074