Sha256: b9bf7c6d63cb88701fe00366feb2c54efa997a3269df4860a30acbcb79d48d69

Contents?: true

Size: 545 Bytes

Versions: 6

Compression:

Stored size: 545 Bytes

Contents

# frozen_string_literal: true

require 'html2pdf/rails/rendering'
require 'html2pdf/rails/helper'

module Html2Pdf
  module Rails
    class Railtie < ::Rails::Railtie
      ActiveSupport.on_load(:action_controller) do
        ActionController::Base.prepend Rendering
      end

      ActiveSupport.on_load(:action_view) do
        ActionView::Base.include Helper
      end

      config.after_initialize do
        if Html2Pdf.config.endpoint.blank?
          raise 'Html2Pdf.config.endpoint is required'
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
html2pdf-rails-0.4.0 lib/html2pdf/rails/railtie.rb
html2pdf-rails-0.3.1 lib/html2pdf/rails/railtie.rb
html2pdf-rails-0.3.0 lib/html2pdf/rails/railtie.rb
html2pdf-rails-0.2.0 lib/html2pdf/rails/railtie.rb
html2pdf-rails-0.1.1 lib/html2pdf/rails/railtie.rb
html2pdf-rails-0.1.0 lib/html2pdf/rails/railtie.rb