README.md in activestorage-validator-0.3.0 vs README.md in activestorage-validator-0.4.0
- old
+ new
@@ -26,10 +26,10 @@
```ruby
class User < ApplicationRecord
has_one_attached :avatar
has_many_attached :photos
- validates :avatar, presence: true, blob: { content_type: :image } # supported options: :image, :audio, :video, :text
+ validates :avatar, presence: true, blob: { content_type: :web_image } # supported options: :web_image, :image, :audio, :video, :text
validates :photos, presence: true, blob: { content_type: ['image/png', 'image/jpg', 'image/jpeg'], size_range: 1..(5.megabytes) }
# validates :photos, presence: true, blob: { content_type: %r{^image/}, size_range: 1..(5.megabytes) }
end
```