文件删除修改
This commit is contained in:
parent
233f041cc5
commit
81b77bc870
|
@ -181,7 +181,8 @@ class AttachmentsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
# modify by nwb
|
||||
if !@attachment.container.nil? && (@attachment.container.has_attribute?(:course) ||@attachment.container.has_attribute?(:course_id) ) &&(@attachment.container.is_a?(Course) || @attachment.container.course)
|
||||
if !@attachment.container.nil? &&
|
||||
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) ||@attachment.container.has_attribute?(:course_id) ) && @attachment.container.course ) )
|
||||
if @attachment.container.is_a?(News)
|
||||
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
||||
elsif @course.nil?
|
||||
|
|
Loading…
Reference in New Issue