lib/ezprint/processors/pdfkit.rb in ezprint-0.3.1 vs lib/ezprint/processors/pdfkit.rb in ezprint-1.0.0

- old
+ new

@@ -10,12 +10,12 @@ kit.to_pdf end def self.process_html(html) # reroute absolute paths - html.gsub!("src=\"/", "src=\"#{RAILS_ROOT}/public/") - html.gsub!("href=\"/", "src=\"#{RAILS_ROOT}/public/") - html.gsub!("url(/", "url(#{RAILS_ROOT}/public/") + html.gsub!("src=\"/", "src=\"#{Rails.public_path}/") + html.gsub!("href=\"/", "src=\"#{Rails.public_path}/") + html.gsub!("url(/", "url(#{Rails.public_path}/") html end end end end