Fix issue in report (#1941)

This commit is contained in:
aignatov-bio 2019-07-19 10:37:44 +02:00 committed by GitHub
parent c78ab50e0c
commit 2fae7d8208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -78,7 +78,7 @@ gem 'sneaky-save', git: 'https://github.com/einzige/sneaky-save'
gem 'turbolinks', '~> 5.1.1'
gem 'underscore-rails'
gem 'wicked_pdf', '~> 1.1.0'
gem 'wkhtmltopdf-heroku'
gem 'wkhtmltopdf-heroku', '2.12.4'
gem 'aws-sdk-rails'
gem 'aws-sdk-s3'

View file

@ -558,7 +558,7 @@ GEM
websocket-extensions (0.1.4)
whacamole (1.2.0)
wicked_pdf (1.1.0)
wkhtmltopdf-heroku (2.12.5.0)
wkhtmltopdf-heroku (2.12.4.0)
xpath (3.2.0)
nokogiri (~> 1.8)
yomu (0.2.4)
@ -671,7 +671,7 @@ DEPENDENCIES
webpacker (~> 3.5)
whacamole
wicked_pdf (~> 1.1.0)
wkhtmltopdf-heroku
wkhtmltopdf-heroku (= 2.12.4)
yomu
RUBY VERSION

View file

@ -257,7 +257,7 @@ class Asset < ApplicationRecord
end
def image?
content_type == %r{^image/#{Regexp.union(Constants::WHITELISTED_IMAGE_TYPES)}}
content_type =~ %r{^image/#{Regexp.union(Constants::WHITELISTED_IMAGE_TYPES)}}
end
def text?

View file

@ -18,7 +18,7 @@ module TinyMceImages
description = TinyMceAsset.update_old_tinymce(description, self)
tiny_mce_assets.each do |tm_asset|
tm_asset_key = tm_asset.image.preview.key
tm_asset_key = tm_asset.preview.key
encoded_tm_asset = Base64.strict_encode64(tm_asset.image.service.download(tm_asset_key))
new_tm_asset_src = "data:image/jpg;base64,#{encoded_tm_asset}"
html_description = Nokogiri::HTML(description)