Skip to content

Conversation

y-yagi
Copy link

@y-yagi y-yagi commented Mar 10, 2020

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 added 4 commits March 10, 2020 12:33
Render_template matcher uses `assert_template` and `assert_template`
has been extracted to `rails-controller-testing` gem.
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)
```

[1] https://www.github.com/rails/rails/commit/28f88e0074
@coveralls
Copy link

Coverage Status

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants