Sha256: d3b5478721dd217f7488c2adf37b9ffc6e9d792fe6c2ef4dd8e8167270908a18

Contents?: true

Size: 1004 Bytes

Versions: 7

Compression:

Stored size: 1004 Bytes

Contents

# frozen_string_literal: true

module Slim
  class Railtie < ::Rails::Railtie
    initializer 'initialize slim template handler' do
      ActiveSupport.on_load(:action_view) do
        Slim::RailsTemplate = Temple::Templates::Rails(Slim::Engine,
                                                       register_as: :slim,
                                                       # Use rails-specific generator. This is necessary
                                                       # to support block capturing and streaming.
                                                       generator: Temple::Generators::RailsOutputBuffer,
                                                       # Disable the internal slim capturing.
                                                       # Rails takes care of the capturing by itself.
                                                       disable_capture: true,
                                                       streaming: true)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
brakeman-7.0.0 bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb
brakeman-6.2.2 bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb
brakeman-6.2.2.rc1 bundle/ruby/3.3.0/gems/slim-5.2.1/lib/slim/railtie.rb
brakeman-6.2.1 bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb
brakeman-6.2.0 bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb
slim-5.2.1 lib/slim/railtie.rb
slim-5.2.0 lib/slim/railtie.rb