commit
239a824497
3 changed files with 7 additions and 3 deletions
|
@ -39,7 +39,7 @@ function diplayMap(element, data, initial = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addEventListener('ds:page:update', initialize);
|
addEventListener('turbolinks:load', initialize);
|
||||||
|
|
||||||
addEventListener('carte:update', ({ detail: { selector, data } }) => {
|
addEventListener('carte:update', ({ detail: { selector, data } }) => {
|
||||||
const element = document.querySelector(selector);
|
const element = document.querySelector(selector);
|
||||||
|
|
|
@ -262,8 +262,10 @@ class Procedure < ApplicationRecord
|
||||||
if original_attachment.attached?
|
if original_attachment.attached?
|
||||||
kopy.send(attribute).attach({
|
kopy.send(attribute).attach({
|
||||||
io: StringIO.new(original_attachment.download),
|
io: StringIO.new(original_attachment.download),
|
||||||
filename: original_attachment.blob.filename,
|
filename: original_attachment.filename,
|
||||||
content_type: original_attachment.blob.content_type
|
content_type: original_attachment.content_type,
|
||||||
|
# we don't want to run virus scanner on cloned file
|
||||||
|
metadata: { virus_scan_result: ActiveStorage::VirusScanner::SAFE }
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,8 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe IPService do
|
describe IPService do
|
||||||
describe '.ip_trusted?' do
|
describe '.ip_trusted?' do
|
||||||
|
after(:each) { ENV['TRUSTED_NETWORKS'] = nil }
|
||||||
|
|
||||||
subject { IPService.ip_trusted?(ip) }
|
subject { IPService.ip_trusted?(ip) }
|
||||||
|
|
||||||
context 'when the ip is nil' do
|
context 'when the ip is nil' do
|
||||||
|
|
Loading…
Reference in a new issue