faml icon indicating copy to clipboard operation
faml copied to clipboard

Fix deprecation warning on Rails 6.0

Open y-yagi opened this issue 6 years ago • 1 comments

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

y-yagi avatar Mar 10 '20 03:03 y-yagi

Coverage Status

Coverage decreased (-55.5%) to 43.592% when pulling 819cff5a176d1cab26dd18b878f311c3384af1a2 on y-yagi:support_rails60 into 4f2a60af8df61e9da9cd6f3410aa23cb7fadea4e on eagletmt:master.

coveralls avatar Mar 10 '20 03:03 coveralls