附件下载更新
This commit is contained in:
parent
0fc2e3be21
commit
8b0b31f749
|
@ -286,7 +286,7 @@ private
|
||||||
raise ActiveRecord::RecordNotFound if params[:filename] && params[:filename] != @attachment.filename
|
raise ActiveRecord::RecordNotFound if params[:filename] && params[:filename] != @attachment.filename
|
||||||
if @attachment.container_type == 'Course'
|
if @attachment.container_type == 'Course'
|
||||||
@course = @attachment.course
|
@course = @attachment.course
|
||||||
elsif @attachment.container.course
|
elsif @attachment.container.has_attribute?(:course) && @attachment.container.course
|
||||||
@course = @attachment.container.course
|
@course = @attachment.container.course
|
||||||
else
|
else
|
||||||
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication'
|
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication'
|
||||||
|
|
Loading…
Reference in New Issue