mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Added name uniqueness validation for organization model.
This commit is contained in:
parent
281022a80c
commit
b1960c08ef
1 changed files with 5 additions and 1 deletions
|
|
@ -7,7 +7,11 @@ class Organization < ApplicationRecord
|
||||||
|
|
||||||
after_create :create_roles
|
after_create :create_roles
|
||||||
|
|
||||||
validates :name, presence: true
|
validates :name,
|
||||||
|
uniqueness: {
|
||||||
|
case_sensitive: false
|
||||||
|
},
|
||||||
|
presence: true
|
||||||
|
|
||||||
mount_uploader :picture, PictureUploader, mount_on: :picture
|
mount_uploader :picture, PictureUploader, mount_on: :picture
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue