Created
May 17, 2011 18:45
-
-
Save jmccartie/977088 to your computer and use it in GitHub Desktop.
Strip HTML from ALL item descriptions
This file contains 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
Item.all.each {|item| item.update_attributes(description: Nokogiri::HTML(item.description).xpath("//text()").remove.to_s) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment