Added comments

Added comment to clarify obscure method
This commit is contained in:
Juan Salvador Pérez García
2018-09-17 09:10:31 +02:00
parent 22907ad1fc
commit 6412f95e56

View File

@@ -61,6 +61,8 @@ module ApplicationHelper
"#{root_url.chomp("\/")}#{url}"
end
# This method is used to embed the font inside CSS when the asset is precompiled. It is required in order to allow
# wkpdfhtml embeding custom fonts inside the PDF.
def self.asset_data_base64(path)
asset = (Rails.application.assets || ::Sprockets::Railtie.build_environment(Rails.application)).find_asset(path)
throw "Could not find asset '#{path}'" if asset.nil?