We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efc809c commit 9cf223aCopy full SHA for 9cf223a
1 file changed
script/maintenance/fix_cross_account_taggings.rb
@@ -1,6 +1,6 @@
1
#!/usr/bin/env ruby
2
3
-require_relative "../config/environment"
+require_relative "../../config/environment"
4
5
cross_account_taggings = Tagging.joins(:tag).where("taggings.account_id != tags.account_id")
6
@@ -9,7 +9,7 @@
9
cross_account_taggings.find_each do |tagging|
10
correct_tag = tagging.account.tags.find_or_create_by!(title: tagging.tag.title)
11
tagging.update!(tag: correct_tag)
12
- puts "Fixed tagging #{tagging.id}: reassigned to tag #{correct_tag.id} (#{correct_tag.title})"
+ puts "Fixed tagging #{tagging.id}: reassigned to tag #{correct_tag.id}"
13
end
14
15
puts "Done!"
0 commit comments