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

Add support to Haml::Plugin for Rails 6 #1008

Merged
merged 1 commit into from Mar 15, 2019

Commits on Mar 15, 2019

  1. Add support to Haml::Plugin for Rails 6

    In Rails 6 the API for template handlers is changing, a template handler
    must now take two arguments [1], the template and the source, otherwise you
    will see the following deprecation warning:
    
    ```
    ActiveSupport::DeprecationException: 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#call(template)
    To:
      >> Class#call(template, source)
    ```
    
    I have attempted to retain support for older versions of Rails by
    providing a default source of `nil`.
    
    [1] https://www.github.com/rails/rails/commit/28f88e0074
    sebjacobs committed Mar 15, 2019
    Copy the full SHA
    6eb88c8 View commit details
    Browse the repository at this point in the history