Skip to content

Instantly share code, notes, and snippets.

@tobiashm
Created October 15, 2012 13:18
Show Gist options
  • Save tobiashm/3892422 to your computer and use it in GitHub Desktop.
Save tobiashm/3892422 to your computer and use it in GitHub Desktop.
rake db:protect_environment
namespace :db do
task :protect_evironment do
raise "Do not run db task in #{Rails.env} mode (or use env FORCE=true)" unless Rails.env.test? or ENV['FORCE']
end
task :load_config => :protect_evironment
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment