From 35c40553cdd50e3c5a44357c2276b8cd6be22d00 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 19 Jul 2010 08:44:59 -0700 Subject: [PATCH] Refactor: extract method. --- lib/redmine_contracts/budget_plugin_migration.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/redmine_contracts/budget_plugin_migration.rb b/lib/redmine_contracts/budget_plugin_migration.rb index f299e95..795af24 100644 --- a/lib/redmine_contracts/budget_plugin_migration.rb +++ b/lib/redmine_contracts/budget_plugin_migration.rb @@ -86,7 +86,7 @@ module RedmineContracts end - deliverable.notes += "Converted data:\n
" + old_deliverable.pretty_inspect + "
" + append_old_deliverable_to_notes(old_deliverable, deliverable) deliverable.save! end @@ -112,5 +112,9 @@ module RedmineContracts contract.save! contract end + + def self.append_old_deliverable_to_notes(old_deliverable, new_deliverable) + new_deliverable.notes += "Converted data:\n
" + old_deliverable.pretty_inspect + "
" + end end end