diff options
-rw-r--r-- | app/models/character.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/character.rb b/app/models/character.rb index 92e84c7..c0f785f 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -17,6 +17,8 @@ class Character < ApplicationRecord validates_uniqueness_of :name, message: "is already being used" validates_format_of :name, with: /\A[a-z]+\z/i, message: "must consist of letters only" + attribute :wounds, :integer, default: 0 + after_create :create_skills after_create { Hearth.create(character: self) } |