Merge branch 'development' into 'master'
Development Bugfixes to add uniqueness constraints to Super Attacks and Leader Skills See merge request !7
This commit is contained in:
commit
aee4ec8da4
3 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
class LeaderSkill < ActiveRecord::Base
|
class LeaderSkill < ActiveRecord::Base
|
||||||
has_paper_trail
|
has_paper_trail
|
||||||
|
|
||||||
validates :description, presence: true
|
validates :description, presence: true,
|
||||||
|
uniqueness: { case_sensitive: false }
|
||||||
end
|
end
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -2,7 +2,8 @@ class SuperAttack < 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) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue