1
0
Fork 0

Merge branch 'atomaka/bugfix/unique-passive-skill' into 'development'

Uniqueness constraint on passive skill



See merge request !6
This commit is contained in:
Andrew Tomaka 2015-10-23 11:28:07 -04:00
commit 6e9ad101e0

View file

@ -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