#1136 代码过长,换行处理
This commit is contained in:
parent
c2020a9535
commit
ae40e1341a
|
@ -180,9 +180,10 @@ class AttachmentsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
# modify by nwb
|
|
||||||
if !@attachment.container.nil? &&
|
if !@attachment.container.nil? &&
|
||||||
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) ||@attachment.container.has_attribute?(:course_id) ) && @attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) && @attachment.container.board && @attachment.container.board.course ) )
|
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) &&
|
||||||
|
@attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) &&
|
||||||
|
@attachment.container.board && @attachment.container.board.course ) )
|
||||||
if @attachment.container.is_a?(News)
|
if @attachment.container.is_a?(News)
|
||||||
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
||||||
elsif @attachment.container.is_a?(Message)
|
elsif @attachment.container.is_a?(Message)
|
||||||
|
|
Loading…
Reference in New Issue