fixed image extensions to fit capital leters
This commit is contained in:
parent
d27b46a81b
commit
73e8a8b4ed
|
|
@ -14,7 +14,7 @@ class Image < ApplicationRecord
|
|||
}
|
||||
# before_post_process :rename_file
|
||||
validates_attachment_content_type :image, content_type: /\Aimage/
|
||||
validates_attachment_file_name :image, matches: [/png\z/, /jpe?g\z/]
|
||||
validates_attachment_file_name :image, matches: [/png\z/, /jpe?g\z/, /PNG\z/, /JPE?G\z/]
|
||||
do_not_validate_attachment_file_type :image
|
||||
scope :by_image_type, ->(type) { where(imageable_type: type) }
|
||||
scope :by_position_desc, -> { order(position: :desc) }
|
||||
|
|
|
|||
Loading…
Reference in New Issue