Merge commit '9f078e238d' into kb_migration

This commit is contained in:
KMY 2023-07-08 11:28:29 +09:00
commit 01e57e84ac
7 changed files with 26 additions and 6 deletions

View file

@ -24,7 +24,7 @@ module Attachmentable
def self.has_attached_file(name, options = {}) # rubocop:disable Naming/PredicateName
super(name, options)
send(:"before_#{name}_validate") do
send(:"before_#{name}_validate", prepend: true) do
attachment = send(name)
check_image_dimension(attachment)
set_file_content_type(attachment)