Merge branch 'develop' of http://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
huang 2016-02-23 09:13:10 +08:00
commit 929afea196
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#coding=utf-8
namespace :resource_publish do
desc "start publish resource"
task :publish => :environment do
attachments = Attachment.where("publish_time = '#{Date.today}'")
attachments.each do |attachment|
attachment.update_column('is_publish', 1)
end
end
end