From 4e89b79597f87057b866b715173c0a6da77c8cfa Mon Sep 17 00:00:00 2001 From: David Gay Date: Sat, 5 Jun 2021 17:15:18 -0400 Subject: Split activity processing code out into a new class --- app/models/character.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') 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] -- cgit v1.2.3