Created
October 18, 2013 19:25
-
-
Save emilyemoss/7046768 to your computer and use it in GitHub Desktop.
Replace bad tags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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