Fixed issue with sprockets in production
This commit is contained in:
@@ -62,7 +62,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def self.asset_data_base64(path)
|
||||
asset = Rails.application.assets.find_asset(path)
|
||||
asset = Rails.application.assets_manifest.find(path).first
|
||||
throw "Could not find asset '#{path}'" if asset.nil?
|
||||
base64 = Base64.encode64(asset.to_s).gsub(/\s+/, "")
|
||||
"data:#{asset.content_type};base64,#{Rack::Utils.escape(base64)}"
|
||||
|
||||
Reference in New Issue
Block a user