From c02edf75542d1fa56c1a1d7457e9fb9df87ce901 Mon Sep 17 00:00:00 2001 From: Alinson Santos Date: Fri, 7 Mar 2008 10:36:03 -0700 Subject: [PATCH] Bugfix --- app/controllers/attachments_controller.rb | 2 +- app/controllers/news_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index e8aa0cd..a5beb06 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -91,7 +91,7 @@ class AttachmentsController < ApplicationController @attachment = Attachment.find_with_deleted(params[:id]) @attachment.update_attribute(:deleted_at, nil) 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) end diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 663dd9a..ec31172 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -91,7 +91,7 @@ class NewsController < ApplicationController @news.update_attribute(:deleted_at, nil) 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| format.html { redirect_to course_news_url(@news.course, @news) }