We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5773260 commit 8ef51a0Copy full SHA for 8ef51a0
app/models/better_together/event.rb
@@ -37,6 +37,12 @@ class Event < ApplicationRecord
37
saver: { strip: true, quality: 85, optimize_coding: true }, format: 'png'
38
end
39
40
+ CONTENT_TYPES = %w[image/jpeg image/png image/gif image/webp image/svg+xml].freeze
41
+
42
+ validates :cover_image,
43
+ content_type: CONTENT_TYPES,
44
+ size: { less_than: 100.megabytes, message: 'is too large' }
45
46
alias card_image cover_image
47
48
attr_accessor :remove_cover_image
0 commit comments