Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

refactor: remove dead code and rename variable

Christophe Bliardef9791261cfa
diff --git a/app/services/concerns/with_reversible_state.rb b/app/services/concerns/with_reversible_state.rb
index ef3a3ac44ff..9d610740fc8 100644
--- a/app/services/concerns/with_reversible_state.rb
+++ b/app/services/concerns/with_reversible_state.rb
@@ -50,9 +50,8 @@ module WithReversibleState
##
# Assign state to the service result
def assign_state
- yield.tap do |call|
- state.called!(self)
- call.state = state
+ yield.tap do |service_result|
+ service_result.state = state
end
end
end
diff --git a/app/services/shared/service_state.rb b/app/services/shared/service_state.rb
index b5231b91e5d..9f67bd45746 100644
--- a/app/services/shared/service_state.rb
+++ b/app/services/shared/service_state.rb
@@ -40,16 +40,5 @@ module Shared
def self.build(state = {})
self === state ? state : new(state)
end
-
- ##
- # Remember that the state was passed to the given service
- def called!(service)
- service_chain << service
- end
-
- # Remembered service calls this context was used against
- def service_chain
- @service_chain ||= []
- end
end
end