diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-09-13 14:50:59 +0100 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-09-13 14:50:59 +0100 |
commit | 1e2b6a8acf65f48edb1e03f4f024db9644765897 (patch) | |
tree | d8b87e874e383fcac83e29cf05673606c946fc4e /lib/tasks/temp.rake | |
parent | bd94b0390fcfba53bee7d546227e94e860f37c17 (diff) | |
parent | 6d3d9d9846fa905e606f0a2aa6f1ec32122f4850 (diff) |
Merge branch 'wdtk' of git.mysociety.org:/data/git/public/alaveteli into wdtk
Diffstat (limited to 'lib/tasks/temp.rake')
-rw-r--r-- | lib/tasks/temp.rake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/tasks/temp.rake b/lib/tasks/temp.rake index 669cdf989..e50ee2cb8 100644 --- a/lib/tasks/temp.rake +++ b/lib/tasks/temp.rake @@ -1,5 +1,14 @@ namespace :temp do + desc 'Populate the request_classifications table from info_request_events' + task :populate_request_classifications => :environment do + InfoRequestEvent.find_each(:conditions => ["event_type = 'status_update'"]) do |classification| + RequestClassification.create!(:created_at => classification.created_at, + :user_id => classification.params[:user_id], + :info_request_event_id => classification.id) + end + end + desc "Remove plaintext passwords from post_redirect params" task :remove_post_redirect_passwords => :environment do PostRedirect.find_each(:conditions => ['post_params_yaml is not null']) do |post_redirect| |