From: Tom Hughes Date: Sun, 13 May 2012 17:44:54 +0000 (+0100) Subject: Fixed diary entry and comment hiding for mass assignment protection X-Git-Tag: live~5703 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/58559d50daf613cbe9bb04db9d77625d59b7205e?ds=sidebyside;hp=3e180e745c0787aa1d2f1665a12d0378c8816aa7 Fixed diary entry and comment hiding for mass assignment protection --- 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