Change REST API to return empty data for suspended accounts (#14765)

This commit is contained in:
Eugen Rochko authored and GitHub committed 2020-09-11 15:16:29 +02:00
1 parent e6d67f85e2
commit e6b272e5c9
22 files changed
+79 -30

No files matched your search

+4
View File
@@ -35,6 +35,10 @@ module Paperclip
formats.include?(other_extension.delete('.')) && File.basename(other_filename, other_extension) == File.basename(original_filename, File.extname(original_filename))
end
def default_url(style_name = default_style)
@url_generator.for_as_default(style_name)
end
end
end
@@ -11,6 +11,10 @@ module Paperclip
Addressable::URI.parse(url).normalize.to_str.gsub(escape_regex) { |m| "%#{m.ord.to_s(16).upcase}" }
end
end
def for_as_default(style_name)
attachment_options[:interpolator].interpolate(default_url, @attachment, style_name)
end
end
end