Refactor: extract method.
This commit is contained in:
@@ -86,7 +86,7 @@ module RedmineContracts
|
||||
|
||||
end
|
||||
|
||||
deliverable.notes += "Converted data:\n<pre>" + old_deliverable.pretty_inspect + "</pre>"
|
||||
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<pre>" + old_deliverable.pretty_inspect + "</pre>"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user