Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[actionview] Add name of template for "Single arity template handlers are deprecated." warning #35413

Closed
localhostdotdev opened this issue Feb 26, 2019 · 1 comment

Comments

@localhostdotdev
Copy link
Contributor

localhostdotdev commented Feb 26, 2019

Steps to reproduce

  • Have a slim template
  • Run rails server
  • See 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:
  >> #<Class:0x00007fe2d32ac160>#call(template)
To:
  >> #<Class:0x00007fe2d32ac160>#call(template, source)

Expected behavior

  • Warning indicates the cause without having to edit the rails's source code

Actual behavior

  • Warning doesn't indicate what's causing the warning

System configuration

Rails version: latest from Github (rails6.beta2)

Ruby version: 2.5.0

(I've reported the warning to slim: slim-template/slim#827)

@localhostdotdev localhostdotdev changed the title [Rails6] Add name of template for "Single arity template handlers are deprecated." warning [actionview] Add name of template for "Single arity template handlers are deprecated." warning Feb 26, 2019
@rafaelfranca
Copy link
Member

This is actually an issue on slim. It doesn't define a name for its template class so we can't show in the message.

Can you please open an issue on slim repository about that? Here is where they create anonymous class.

https://github.com/judofyr/temple/blob/master/lib/temple/mixins/template.rb#L19

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

No branches or pull requests

2 participants