Skip to content

Conversation

@lavika
Copy link

@lavika lavika commented Apr 18, 2022

After upgrading our application to Rails 6, 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 rails/coffee-rails@cbf6af6
prawn-rails cortiz/prawn-rails@9be2087

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

@sukeerthiadiga
Copy link
Contributor

+1

@smlsml
Copy link

smlsml commented Apr 19, 2022

I assume the upstream is unmaintained yeah? It'd be nice if we didn't have to maintain our own fork if they will take this change too!

@lavika
Copy link
Author

lavika commented Apr 21, 2022

I assume the upstream is unmaintained yeah? It'd be nice if we didn't have to maintain our own fork if they will take this change too!

Yes correct. The upstream is unmaintained. I tried to get this change in the upstream, but there has not been any response since one year. Reference - bsiggelkow/jsonify-rails#12.
Hence we decided to fork it and maintain the fork.

@sukeerthiadiga sukeerthiadiga merged commit 21b86ed into master Apr 25, 2022
@lavika lavika deleted the fix-single-arity-template-handlers-deprecation-warning-in-rails-6 branch April 25, 2022 10:13
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.

5 participants