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

Require any installed prawn extensions #29

Merged
merged 9 commits into from
Jun 6, 2018
13 changes: 11 additions & 2 deletions lib/prawn-rails/document.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
require 'prawn'
require 'prawn/table'
require "prawn-rails/extension"
require 'prawn-rails/extension'

Gem.loaded_specs.keys.select{|spec_name| spec_name.starts_with?('prawn-')}.each do |gem_name|
next if gem_name == 'prawn-rails' # Prevent circular loading
begin
require gem_name.gsub('-', '/')
rescue LoadError => e
puts e
puts e.backtrace
end
end

module PrawnRails

Expand Down