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

use render_error_flash_message_via_turbo_stream where scheme: :danger was used

Ivan Kuchin8eebf559dd81
diff --git a/app/controllers/admin/custom_fields/hierarchy/items_controller.rb b/app/controllers/admin/custom_fields/hierarchy/items_controller.rb
index 3a311ef752e..731de1b0c88 100644
--- a/app/controllers/admin/custom_fields/hierarchy/items_controller.rb
+++ b/app/controllers/admin/custom_fields/hierarchy/items_controller.rb
@@ -104,7 +104,7 @@ module Admin
.delete_branch(item: @active_item)
.either(
->(_) { update_via_turbo_stream(component: ItemsComponent.new(item: @active_item.parent)) },
- ->(errors) { render_flash_message_via_turbo_stream(message: errors.full_messages, scheme: :danger) }
+ ->(errors) { render_error_flash_message_via_turbo_stream(message: errors.full_messages) }
)
respond_with_turbo_streams(&:html)
diff --git a/app/controllers/work_packages/reminders_controller.rb b/app/controllers/work_packages/reminders_controller.rb
index da2914825ac..0b4796824ab 100644
--- a/app/controllers/work_packages/reminders_controller.rb
+++ b/app/controllers/work_packages/reminders_controller.rb
@@ -98,10 +98,7 @@ class WorkPackages::RemindersController < ApplicationController
render_success_flash_message_via_turbo_stream(message: I18n.t("work_package.reminders.success_deletion_message"))
respond_with_turbo_streams
else
- render_flash_message_via_turbo_stream(
- message: service_result.errors.full_messages,
- scheme: :danger
- )
+ render_error_flash_message_via_turbo_stream(message: service_result.errors.full_messages)
respond_with_turbo_streams(status: :unprocessable_entity)
end
end
@@ -167,10 +164,7 @@ class WorkPackages::RemindersController < ApplicationController
.upcoming_and_visible_to(User.current)
.find(params[:id])
rescue ActiveRecord::RecordNotFound
- render_flash_message_via_turbo_stream(
- message: I18n.t(:error_reminder_not_found),
- scheme: :danger
- )
+ render_error_flash_message_via_turbo_stream(message: I18n.t(:error_reminder_not_found))
respond_with_turbo_streams(status: :not_found)
false
end