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
| Find.find('bouclair') do |f| | |
| if f.match(/\.html\Z/) | |
| file = File.open(f, "w") | |
| file.puts('<html><head><meta http-equiv="Refresh" content="0; url=http://www.bouclair.com/" /></head><body><p>Our site has changed! Please follow <a href="http://www.bouclair.com/">this link</a>.</p></body></html>') | |
| end | |
| end |
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
| delete from groups where group_id in ( | |
| select group_id from groups | |
| where group_id not in ( | |
| select productgroup.groupid from groups | |
| inner join productgroup ON groups.group_id = productgroup.groupid | |
| ) | |
| ) |
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
| require 'fileutils' | |
| filenames = Dir.glob("*.jpg") | |
| filenames.each do |filename| | |
| File.rename(filename, filename.gsub(/.jpg/, '') + "fr.jpg") | |
| end |