Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/app/controllers/reviews_controller.rb b/app/controllers/reviews_controller.rb
index fdaa06b..85133e5 100644
--- a/app/controllers/reviews_controller.rb
+++ b/app/controllers/reviews_controller.rb
@@ -26,8 +26,9 @@ class ReviewsController < ApplicationController
duplicated_room = @duplicate_center_version.rooms.create room.duplicated_attributes
room.memberships.each do |membership|
- new_staff_id = staff_id_map[membership.staff_id]
- duplicated_room.memberships.create membership.attributes.merge(:staff_id => new_staff_id)
+ duplicated_room.memberships.create :staff_id => staff_id_map[membership.staff_id],
+ :center_version_id => duplicated_room.center_version_id,
+ :observed => membership.observed
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.