Bugfix
This commit is contained in:
@@ -91,7 +91,7 @@ class AttachmentsController < ApplicationController
|
|||||||
@attachment = Attachment.find_with_deleted(params[:id])
|
@attachment = Attachment.find_with_deleted(params[:id])
|
||||||
@attachment.update_attribute(:deleted_at, nil)
|
@attachment.update_attribute(:deleted_at, nil)
|
||||||
flash[:notice] = 'Attachment restored'[]
|
flash[:notice] = 'Attachment restored'[]
|
||||||
AttachmentRestoreLogEntry.create!(:target_id => @attachment.id, :user => @current_user, :course => @course)
|
AttachmentRestoreLogEntry.create!(:target_id => @attachment.id, :user => @current_user, :course => @attachment.course)
|
||||||
redirect_to course_attachment_url(@attachment.course, @attachment)
|
redirect_to course_attachment_url(@attachment.course, @attachment)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class NewsController < ApplicationController
|
|||||||
@news.update_attribute(:deleted_at, nil)
|
@news.update_attribute(:deleted_at, nil)
|
||||||
flash[:notice] = "News restored"[]
|
flash[:notice] = "News restored"[]
|
||||||
|
|
||||||
NewsRestoreLogEntry.create!(:target_id => @news.id, :user => @current_user, :course => @course)
|
NewsRestoreLogEntry.create!(:target_id => @news.id, :user => @current_user, :course => @news.course)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to course_news_url(@news.course, @news) }
|
format.html { redirect_to course_news_url(@news.course, @news) }
|
||||||
|
|||||||
Reference in New Issue
Block a user