From 6412f95e56006b74e70adca095e3a4710995d998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Salvador=20P=C3=A9rez=20Garc=C3=ADa?= Date: Mon, 17 Sep 2018 09:10:31 +0200 Subject: [PATCH] Added comments Added comment to clarify obscure method --- app/helpers/application_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 06939294b..8a0c87194 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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?