-
Notifications
You must be signed in to change notification settings - Fork 39
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
Changes from 2 commits
5db1e81
b53eb3b
be17283
522e25c
3d50134
fe19ebd
a0e21d6
3fe437b
074d536
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
require 'prawn' | ||
require 'prawn/table' | ||
require "prawn-rails/extension" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-add require "prawn-rails/extension" after this loop and remove from inside the loop |
||
Gem::Specification.find_all{|s| s.name =~ /prawn/}.map(&:name).each do |gem_name| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the condition for find_all should probably be |
||
case gem_name | ||
when 'prawn-rails' then require 'prawn-rails/extension' | ||
else require gem_name.gsub('-', '/') | ||
end | ||
end | ||
|
||
module PrawnRails | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-add this require prawn and remove require prawn from the loop.