From 58559d50daf613cbe9bb04db9d77625d59b7205e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 13 May 2012 18:44:54 +0100 Subject: [PATCH] Fixed diary entry and comment hiding for mass assignment protection --- app/controllers/diary_entry_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index 3e012f23c..c45d369ac 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -176,13 +176,13 @@ class DiaryEntryController < ApplicationController def hide entry = DiaryEntry.find(params[:id]) - entry.update_attributes(:visible => false) + entry.update_attributes({:visible => false}, :without_protection => true) redirect_to :action => "list", :display_name => entry.user.display_name end def hidecomment comment = DiaryComment.find(params[:comment]) - comment.update_attributes(:visible => false) + comment.update_attributes({:visible => false}, :without_protection => true) redirect_to :action => "view", :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id end -- 2.43.2