Class#call(template, source)

テンプレートクラスで 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:
  >> ...#call(template)
To:
  >> ...#call(template, source)

参考:

Introduce a file type template by tenderlove · Pull Request #35119 · rails/rails – GitHub

Pass source to template handler and deprecate old style handler · rails/rails@28f88e0 – GitHub

Fix arity warning for template handlers by localhostdotdev · Pull Request #35858 · rails/rails – GitHub

Slim

参考:

[actionview] Add name of template for “Single arity template handlers are deprecated.” warning · Issue #35413 · rails/rails – GitHub

Compatibility with Rails 6: Single arity template handlers are deprecated. · Issue #827 · slim-template/slim – GitHub

Haml

参考:

Single arity template handlers and rails 6.0.0.beta2 · Issue #1007 · haml/haml – GitHub

Add support to `Haml::Plugin` for Rails 6 by sebjacobs · Pull Request #1008 · haml/haml – GitHub

Jbuilder

参考:

DEPRECATION WARNING in new --edge app · Issue #452 · rails/jbuilder – GitHub

Fix deprecation warning for JBuilder templates by tenderlove · Pull Request #453 · rails/jbuilder – GitHub

記事をシェアする:
タグ:

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

Protected by reCAPTCHA