mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-29 11:12:01 +08:00
Fix issue in report (#1941)
This commit is contained in:
parent
c78ab50e0c
commit
2fae7d8208
4 changed files with 5 additions and 5 deletions
2
Gemfile
2
Gemfile
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue