Merge branch 'atomaka/bugfix/unique-passive-skill' into 'development'
Uniqueness constraint on passive skill See merge request !6
This commit is contained in:
commit
6e9ad101e0
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,8 @@ class PassiveSkill < ActiveRecord::Base
|
||||||
has_paper_trail
|
has_paper_trail
|
||||||
|
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
validates :description, presence: true
|
validates :description, presence: true,
|
||||||
|
uniqueness: { scope: :name }
|
||||||
|
|
||||||
default_scope { order(:name) }
|
default_scope { order(:name) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue