]> git.openstreetmap.org Git - rails.git/blob - lib/tasks/subscribe_diary_authors.rake
Keep zeitwerk at 2.6 for ruby 3.1 support
[rails.git] / lib / tasks / subscribe_diary_authors.rake
1 namespace :db do
2   task :subscribe_diary_authors => :environment do
3     DiaryEntry.find_each do |diary_entry|
4       diary_entry.subscriptions.create(:user => diary_entry.user) unless diary_entry.subscribers.exists?(diary_entry.user.id)
5     end
6   end
7 end