Skip to content

Commit

Permalink
track rb validation
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Aug 20, 2023
1 parent f985a0d commit 5f01fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/track.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class Track < ApplicationRecord
has_one_attached :mp3_audio
has_one_attached :zip

validates :cover, presence: true, blob: { content_type: :web_image } # supported options: :web_image, :image, :audio, :video, :text
validates :cover, presence: false, blob: { content_type: :web_image } # supported options: :web_image, :image, :audio, :video, :text

validates :audio, presence: true, blob: { content_type: :audio, size_range: 1..(400.megabytes) } # supported options: :web_image, :image, :audio, :video, :text
validates :audio, presence: false, blob: { content_type: :audio, size_range: 1..(400.megabytes) } # supported options: :web_image, :image, :audio, :video, :text


acts_as_likeable
Expand Down

0 comments on commit 5f01fb2

Please sign in to comment.