lib/ezprint/processors/prince.rb in ezprint-0.3.1 vs lib/ezprint/processors/prince.rb in ezprint-1.0.0
- old
+ new
@@ -23,12 +23,12 @@
prince_cmd << " --silent - -o -"
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