Rails Minimagick not showing error
-
29-07-2023 - |
题
Why is alert not showing when submiting a form? Im trying to process images with Minimagick and validate image dimensions.
Model
`def validate_minimum_image_size
image = MiniMagick::Image.open(photo.path)
unless image[:width] > 1300 && image[:height] > 1300
errors.add :image, alert: "My error here"
end
end`
THANKS
没有正确的解决方案
不隶属于 StackOverflow