Sha256: 655e9133433f22289644fb38e356771ce665cb89278af1c2147602bbb0153f9f

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

# https://github.com/nesquena/rabl/pull/723
module ActionView
  module Template::Handlers
    class Rabl
      class_attribute :default_format, default: :json

      def self.call(_template, source)
        %{ ::Rabl::Engine.new(#{source.inspect}).
            apply(self, assigns.merge(local_assigns)).
            render }
      end
    end
  end
end

ActionView::Template.register_template_handler :rabl, ActionView::Template::Handlers::Rabl

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_api-4.0.0.rc1 config/initializers/rabl_rails6_fix.rb
spree_api-4.0.0.beta config/initializers/rabl_rails6_fix.rb