We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b25e4a commit d8f8978Copy full SHA for d8f8978
app/models/plan.rb
@@ -259,8 +259,7 @@ def self.deep_copy(plan)
259
plan_copy.identifier = plan_copy.id.to_s
260
plan.answers.each do |answer|
261
answer_copy = Answer.deep_copy(answer)
262
- answer_copy.plan_id = plan_copy.id
263
- answer_copy.save!
+ plan_copy.answers << answer_copy
264
end
265
plan.guidance_groups.each do |guidance_group|
266
plan_copy.guidance_groups << guidance_group if guidance_group.present?
0 commit comments