jsonify-rails icon indicating copy to clipboard operation
jsonify-rails copied to clipboard

Fix single arity template handler deprecation warning with Rails 6.0

Open lavika opened this issue 3 years ago • 2 comments

Here I am getting this 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:
  >> ActionView::Template::Handlers::JsonifyBuilder.call(template)
To:
  >> ActionView::Template::Handlers::JsonifyBuilder.call(template, source)

when I start the server.

It has been resolved by other template gems -

cofee-rails https://github.com/rails/coffee-rails/commit/cbf6af63ac57cea246b75275ba50769d12f43316 prawn-rails https://github.com/cortiz/prawn-rails/pull/39/commits/9be20878ab6c9ee337c4c3dfb3e983ee1921f0e9

I have used a similar approach to resolve this here. Please let me know if this works.

lavika avatar Apr 28 '21 21:04 lavika

@bsiggelkow could you or someone you assign, review this PR?

lavika avatar Jun 09 '21 17:06 lavika

Will this be merged? As of Rails 6.1 this gem no longer works due to the issue identified by @lavika and I'm having to use a local fork. I appreciate it's a very old gem :)

caerphoto avatar May 05 '23 10:05 caerphoto