Skip to content

Instantly share code, notes, and snippets.

@emilyemoss
Created October 18, 2013 19:25
Show Gist options
  • Save emilyemoss/7046768 to your computer and use it in GitHub Desktop.
Save emilyemoss/7046768 to your computer and use it in GitHub Desktop.
Replace bad tags
def tag_cleaner(bad, good, list)
if list == "location"
array = Link.tagged_with(bad)
array.find_each do |l|
l.location_list.add(good)
l.location_list.remove(bad)
l.save
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment