From 76d25882e8d311170e19c8a71adba77e3ed961e6 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Fri, 9 Aug 2013 18:44:43 +0800 Subject: [PATCH] Added Rake task to update desktop users to new_ui --- lib/tasks/desktop_update.rake | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/tasks/desktop_update.rake diff --git a/lib/tasks/desktop_update.rake b/lib/tasks/desktop_update.rake new file mode 100644 index 00000000..2033bf00 --- /dev/null +++ b/lib/tasks/desktop_update.rake @@ -0,0 +1,11 @@ +namespace :desktop_update do + task :update_users => :environment do + @desktop_user = User.all + @desktop_user.each do |u| + desk = u.desktop + desk.theme = DesktopTheme.first.id.to_s + desk.wallpaper = nil + desk.save! + end + end +end