Avoid deprecation warning in migration
authorTom Hughes <tom@compton.nu>
Mon, 16 Feb 2015 22:53:52 +0000 (22:53 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 16 Feb 2015 22:53:52 +0000 (22:53 +0000)
db/migrate/20150111192335_subscribe_old_changesets.rb

index 2bc021476ce2d7acabf95ca1a098772aea1f38e4..cd0938318d7b83a4eca608abe36f2728520b4d50 100644 (file)
@@ -1,7 +1,7 @@
 class SubscribeOldChangesets < ActiveRecord::Migration
   def up
     Changeset.find_each do |changeset|
-      changeset.subscribers << changeset.user unless changeset.subscribers.exists?(changeset.user)
+      changeset.subscribers << changeset.user unless changeset.subscribers.exists?(changeset.user.id)
     end
   end