Skip to content

Instantly share code, notes, and snippets.

@jasondew
Created May 14, 2009 13:01
Show Gist options
  • Save jasondew/111651 to your computer and use it in GitHub Desktop.
Save jasondew/111651 to your computer and use it in GitHub Desktop.
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