diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/character.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/character.rb b/app/models/character.rb index c0f785f..52c0959 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -96,7 +96,7 @@ class Character < ApplicationRecord def add_skill_xp(skill, amount) skill = Skill.find_by_gid(skill) if skill.is_a? String Character.transaction do - cs = CharacterSkill.find_by(skill: skill) + cs = self.character_skills.find_by(skill: skill) cs.xp += amount cs.save! end |