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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Replace inline actions with constant
Oliver Güntherd593d4046c34
diff --git a/app/components/concerns/op_turbo/streamable.rb b/app/components/concerns/op_turbo/streamable.rbindex 6c78c14a566..9f61dbeb36b 100644--- a/app/components/concerns/op_turbo/streamable.rb+++ b/app/components/concerns/op_turbo/streamable.rb@@ -32,6 +32,8 @@ module OpTurboclass MissingComponentWrapper < StandardError; end# rubocop:enable OpenProject/AddPreviewForViewComponent+ INLINE_ACTIONS = %i[dialog flash].freeze+extend ActiveSupport::Concernclass_methods do@@ -56,7 +58,7 @@ module OpTurboraise ArgumentError, "Unsupported action #{action}"end- if inline_actions.exclude?(action) && !wrapped?+ if INLINE_ACTIONS.exclude?(action) && !wrapped?raise MissingComponentWrapper,"Wrap your component in a `component_wrapper` block in order to use turbo-stream methods"end@@ -100,10 +102,6 @@ module OpTurboendend- def inline_actions- %i[dialog flash]- end-def wrapped?!!@wrappedend