Sha256: 73dbaa0f1ab8764e66173f67f74f4d0ec186a26287020bf7d4d3e7e38c3f5a4d

Contents?: true

Size: 598 Bytes

Versions: 7

Compression:

Stored size: 598 Bytes

Contents

require 'wicked_pdf/pdf_helper'
require 'wicked_pdf/wicked_pdf_helper'
require 'wicked_pdf/wicked_pdf_helper/assets'

class WickedPdf
  if defined?(Rails.env)
    class WickedRailtie < Rails::Railtie
      initializer 'wicked_pdf.register', :after => 'remotipart.controller_helper' do |_app|
        ActiveSupport.on_load(:action_controller) { ActionController::Base.send :prepend, PdfHelper }
        ActiveSupport.on_load(:action_view) { include WickedPdfHelper::Assets }
      end
    end

    Mime::Type.register('application/pdf', :pdf) if Mime::Type.lookup_by_extension(:pdf).nil?

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wicked_pdf-2.8.2 lib/wicked_pdf/railtie.rb
wicked_pdf-2.8.1 lib/wicked_pdf/railtie.rb
wicked_pdf-2.8.0 lib/wicked_pdf/railtie.rb
wicked_pdf-2.7.0 lib/wicked_pdf/railtie.rb
wicked_pdf-2.6.3 lib/wicked_pdf/railtie.rb
wicked_pdf-2.6.2 lib/wicked_pdf/railtie.rb
wicked_pdf-2.6.0 lib/wicked_pdf/railtie.rb