关联文件同时,关联tag

This commit is contained in:
yanxd 2014-04-14 14:51:12 +08:00
parent 7ae55c1ec8
commit 8b52d63d14
1 changed files with 1 additions and 0 deletions

View File

@ -150,6 +150,7 @@ class AttachmentsController < ApplicationController
ori = Attachment.find_by_id(attach_id)
next if ori.blank?
attach_copied_obj = ori.copy
attach_copied_obj.tag_list.add(ori.tag_list) # tag关联
attach_copied_obj.container = obj
attach_copied_obj.created_on = Time.now
attach_copied_obj.author_id = User.current.id