X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/549acfa918c04fa20b3386fece25ce69b3565519..357de642b32520cc6a899384b1f8ad078dc479b1:/app/controllers/diary_entry_controller.rb diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index 5bd95775d..7f5f4fb3a 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -48,7 +48,7 @@ class DiaryEntryController < ApplicationController if current_user != @diary_entry.user redirect_to :action => "view", :id => params[:id] - elsif params[:diary_entry] && @diary_entry.update_attributes(entry_params) + elsif params[:diary_entry] && @diary_entry.update(entry_params) redirect_to :action => "view", :id => params[:id] end @@ -192,13 +192,13 @@ class DiaryEntryController < ApplicationController def hide entry = DiaryEntry.find(params[:id]) - entry.update_attributes(:visible => false) + entry.update(:visible => false) 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(:visible => false) redirect_to :action => "view", :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id end