Skip to content

Commit

Permalink
Re-add slug uniqueness validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvieed committed Feb 22, 2022
1 parent ffa3e7c commit 1c99baf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Work < ApplicationRecord
after_create :alert_intercom

validates :title, presence: true, length: { minimum: 3, maximum: 255 }
validates :slug, format: { with: /[[:alpha:]]/ }
validates :slug, uniqueness: { case_sensitive: true }, format: { with: /[[:alpha:]]/ }
validate :document_date_is_edtf

mount_uploader :picture, PictureUploader
Expand Down

0 comments on commit 1c99baf

Please sign in to comment.