Skip to content

Instantly share code, notes, and snippets.

@AgentAntelope
Created July 12, 2013 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AgentAntelope/5982430 to your computer and use it in GitHub Desktop.
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`.
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