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
fix missing refactoring
as-op51b9baa57beb
diff --git a/app/models/type/pdf_export_templates.rb b/app/models/type/pdf_export_templates.rbindex b0a5cd90ee8..219f3315b80 100644--- a/app/models/type/pdf_export_templates.rb+++ b/app/models/type/pdf_export_templates.rb@@ -31,8 +31,8 @@class Type::PdfExportTemplatesTemplate = Data.define(:id, :label, :caption, :enabled)- def initialize(model)- @type = model+ def initialize(type)+ @type = typeenddef list@@ -78,11 +78,11 @@ class Type::PdfExportTemplatesenddef move(template_id, position)- template_ids = @type.pdf_export_templates_for_type.map(&:id)- prev_index = template_ids.find_index(template_id)- template_ids.delete_at(prev_index) unless prev_index.nil?- template_ids.insert(position, template_id)- @type.export_templates_order = template_ids+ ordered_template_ids = list.map(&:id)+ prev_index = ordered_template_ids.find_index(template_id)+ ordered_template_ids.delete_at(prev_index) unless prev_index.nil?+ ordered_template_ids.insert(position, template_id)+ @type.export_templates_order = ordered_template_idsendprivate