Add sorting order for NCCU request

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-07-03 15:47:28 +08:00
1 parent 4014f8ee47
commit 4fe92b844e
3 files changed
+14 -2

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
require 'resque_scheduler/tasks'
# encoding: utf-8
namespace :data_migration do
task :add_order_to_announcement_tag_0703 => :environment do
AnnouncementTag.first({conditions:{ key: 'students' }}).update_attributes(:order=>1)
AnnouncementTag.first({conditions:{ key: 'alumni' }}).update_attributes(:order=>2)
AnnouncementTag.first({conditions:{ key: 'employee' }}).update_attributes(:order=>3)
AnnouncementTag.first({conditions:{ key: 'guest' }}).update_attributes(:order=>4)
end
end