]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20150111192335_subscribe_old_changesets.rb
Merge remote-tracking branch 'upstream/pull/2239'
[rails.git] / db / migrate / 20150111192335_subscribe_old_changesets.rb
index 2bc021476ce2d7acabf95ca1a098772aea1f38e4..ad23026d012449609b2e2bbd09b67151a2a3ad0c 100644 (file)
@@ -1,10 +1,9 @@
-class SubscribeOldChangesets < ActiveRecord::Migration
+class SubscribeOldChangesets < ActiveRecord::Migration[4.2]
   def up
     Changeset.find_each do |changeset|
   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
 
     end
   end
 
-  def down
-  end
+  def down; end
 end
 end