mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-26 23:18:58 +08:00
Comment out wicked_pdf initializer patch
This commit is contained in:
parent
3cfcae1003
commit
5c63ee55e7
1 changed files with 13 additions and 13 deletions
|
@ -10,16 +10,16 @@ end
|
|||
# WickedPdfHelper patch that fixes issue with including application.css
|
||||
# in environments like Heroku where assets.compile option is disabled and
|
||||
# it is not acceptable to enable it.
|
||||
if Rails.env.production? && Rails.configuration.assets.compile == false
|
||||
WickedPdf::WickedPdfHelper::Assets.module_eval do
|
||||
def read_asset(source)
|
||||
manifest = Rails.application.assets_manifest
|
||||
path = File.join(manifest.dir, manifest.assets[source])
|
||||
File.read(path)
|
||||
end
|
||||
|
||||
def asset_exists?(source)
|
||||
Rails.application.assets_manifest.assets.key?(source)
|
||||
end
|
||||
end
|
||||
end
|
||||
# if Rails.env.production? && Rails.configuration.assets.compile == false
|
||||
# WickedPdf::WickedPdfHelper::Assets.module_eval do
|
||||
# def read_asset(source)
|
||||
# manifest = Rails.application.assets_manifest
|
||||
# path = File.join(manifest.dir, manifest.assets[source])
|
||||
# File.read(path)
|
||||
# end
|
||||
#
|
||||
# def asset_exists?(source)
|
||||
# Rails.application.assets_manifest.assets.key?(source)
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
|
|
Loading…
Add table
Reference in a new issue