diff --git a/app/models/leader_skill.rb b/app/models/leader_skill.rb index 3a493af..07c4d64 100644 --- a/app/models/leader_skill.rb +++ b/app/models/leader_skill.rb @@ -1,5 +1,6 @@ class LeaderSkill < ActiveRecord::Base has_paper_trail - validates :description, presence: true + validates :description, presence: true, + uniqueness: { case_sensitive: false } end diff --git a/app/models/passive_skill.rb b/app/models/passive_skill.rb index 6eebdbc..835e035 100644 --- a/app/models/passive_skill.rb +++ b/app/models/passive_skill.rb @@ -2,7 +2,8 @@ class PassiveSkill < ActiveRecord::Base has_paper_trail validates :name, presence: true - validates :description, presence: true + validates :description, presence: true, + uniqueness: { scope: :name } default_scope { order(:name) } end diff --git a/app/models/super_attack.rb b/app/models/super_attack.rb index 332c480..ad32ec1 100644 --- a/app/models/super_attack.rb +++ b/app/models/super_attack.rb @@ -2,7 +2,8 @@ class SuperAttack < ActiveRecord::Base has_paper_trail validates :name, presence: true - validates :description, presence: true + validates :description, presence: true, + uniqueness: { scope: :name } default_scope { order(:name) }