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
chore[Op#57516]: extract method, not found turbo stream response
Kabiru Mwenja44e0bb391bb8
diff --git a/app/controllers/admin/custom_fields/custom_field_projects_controller.rb b/app/controllers/admin/custom_fields/custom_field_projects_controller.rbindex 32ce2877a81..231ac3bc286 100644--- a/app/controllers/admin/custom_fields/custom_field_projects_controller.rb+++ b/app/controllers/admin/custom_fields/custom_field_projects_controller.rb@@ -129,23 +129,14 @@ class Admin::CustomFields::CustomFieldProjectsController < ApplicationControllerrespond_with_turbo_streamsendrescue ActiveRecord::RecordNotFound- update_flash_message_via_turbo_stream message: t(:notice_project_not_found), full: true, dismiss_scheme: :hide,- scheme: :danger- update_project_list_via_turbo_stream-- respond_with_turbo_streams+ respond_with_project_not_found_turbo_streamsenddef find_custom_field_project_to_destroy@project = Project.find(params.to_unsafe_h[:custom_fields_project][:project_id])@custom_field_project = CustomFieldsProject.find_by!(custom_field: @custom_field, project: @project)rescue ActiveRecord::RecordNotFound- update_flash_message_via_turbo_stream(- message: t(:notice_project_not_found), full: true, dismiss_scheme: :hide, scheme: :danger- )- update_project_list_via_turbo_stream-- respond_with_turbo_streams+ respond_with_project_not_found_turbo_streamsenddef update_project_list_via_turbo_stream(url_for_action: action_name)@@ -174,6 +165,14 @@ class Admin::CustomFields::CustomFieldProjectsController < ApplicationController.resultend+ def respond_with_project_not_found_turbo_streams+ update_flash_message_via_turbo_stream message: t(:notice_project_not_found), full: true, dismiss_scheme: :hide,+ scheme: :danger+ update_project_list_via_turbo_stream++ respond_with_turbo_streams+ end+def include_sub_projects?ActiveRecord::Type::Boolean.new.cast(params.to_unsafe_h[:custom_fields_project][:include_sub_projects])end