X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/970e1a99d7dce64f0631e88c5b9f060fb48d75fe..4530f6e3e4a327f5adf348f1cb69fd1ef0bd90f9:/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb diff --git a/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb b/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb index 3fcbdf5fb..219386900 100644 --- a/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb +++ b/db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb @@ -1,4 +1,4 @@ -class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration +class SubscribeAuthorsToDiaryEntries < ActiveRecord::Migration[5.0] def up DiaryEntry.find_each do |diary_entry| diary_entry.subscriptions.create(:user => diary_entry.user) unless diary_entry.subscribers.exists?(diary_entry.user.id)