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
HistoricActiveRecordRelation#pluck: rubocop refactoring
Sebastian Fiedlschuster7c220b5ac749
diff --git a/app/models/journable/historic_active_record_relation.rb b/app/models/journable/historic_active_record_relation.rbindex 446adb57153..b59611e2e58 100644--- a/app/models/journable/historic_active_record_relation.rb+++ b/app/models/journable/historic_active_record_relation.rb@@ -85,7 +85,7 @@ class Journable::HistoricActiveRecordRelation < ActiveRecord::Relationelseif model.column_names_missing_in_journal.include?(column_name.to_s)Rails.logger.warn "Cannot pluck column `#{column_name}` because this attribute is not journalized," \- "i.e. it is missing in the #{journal_class.table_name} table."+ "i.e. it is missing in the #{journal_class.table_name} table.""null as #{column_name}"elsecolumn_namediff --git a/spec/models/journable/historic_active_record_relation_spec.rb b/spec/models/journable/historic_active_record_relation_spec.rbindex 39c8b0372e8..b4c4761ff3b 100644--- a/spec/models/journable/historic_active_record_relation_spec.rb+++ b/spec/models/journable/historic_active_record_relation_spec.rb@@ -127,9 +127,9 @@ describe Journable::HistoricActiveRecordRelation doendit "prints a warning" do- expect(Rails.logger).to receive(:warn).with(/position/)-+ allow(Rails.logger).to receive(:warn)subject+ expect(Rails.logger).to have_received(:warn).with(/position/)endendend