Created
July 12, 2013 06:48
-
-
Save AgentAntelope/5982430 to your computer and use it in GitHub Desktop.
This should live in lib/tasks. It can be run by doing `rake entry:category:change_dreams`.
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
namespace :entry | |
namespace :category | |
desc "Change all entry categories where the category is 'dreams' to 'dreams/sleep' | |
task :change_dreams => :environment do | |
Entry.where(:category => 'dreams').update_all(:category => 'dreams/sleep') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment