diff options
author | David Gay <david@davidgay.org> | 2021-06-05 17:15:18 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-05 17:15:18 -0400 |
commit | 4e89b79597f87057b866b715173c0a6da77c8cfa (patch) | |
tree | b4c4474377128c58d460dd3eda49a6e5077a2676 /app/models | |
parent | 569db9a18911bf954914b0ace678ca79e98cf12a (diff) |
Split activity processing code out into a new class
Diffstat (limited to 'app/models')
-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 b4e597b..91f0a66 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -100,7 +100,7 @@ class Character < ApplicationRecord self.states.all.select { |s| !s.expired? } end - def pay_cost_for(activity) + def pay_activity_cost CharacterItem.transaction do activity.whatnot[:cost]&.each do |cost| case cost[:type] |