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

single arity deprecation warning for Rails 6.1 #94

Closed
nicksoto opened this issue Oct 1, 2019 · 2 comments
Closed

single arity deprecation warning for Rails 6.1 #94

nicksoto opened this issue Oct 1, 2019 · 2 comments

Comments

@nicksoto
Copy link

nicksoto commented Oct 1, 2019

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:
  >> RablRails::Handlers::Rabl.call(template)
To:
  >> RablRails::Handlers::Rabl.call(template, source)

A potential change here would be:

module RablRails
  module Handlers
    class Rabl
      def self.call(template, source=nil)
        %{
          RablRails::Library.instance.
            get_rendered_template(#{(source || template.source).inspect}, self, local_assigns)
        }
      end
    end
  end
end
@navidemad
Copy link

It will be amazing if you may merge it into master 👍

@ccocchi
Copy link
Owner

ccocchi commented Feb 4, 2021

Thank you. The warning have been removed in version 0.6.0 🙂

@ccocchi ccocchi closed this as completed Feb 4, 2021
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

3 participants