]> git.openstreetmap.org Git - rails.git/commitdiff
Specify the user when redirecting back to a diary entry after
authorTom Hughes <tom@compton.nu>
Wed, 27 Jan 2010 09:02:27 +0000 (09:02 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 27 Jan 2010 09:02:27 +0000 (09:02 +0000)
hiding a comment.

app/controllers/diary_entry_controller.rb

index 55035d700a987eb61bfedd83e3602e6a71603dd1..2284d4933ab9e7db59b6902b56cdccd197c3bcdc 100644 (file)
@@ -187,7 +187,7 @@ class DiaryEntryController < ApplicationController
   def hidecomment
     comment = DiaryComment.find(params[:comment])
     comment.update_attributes(:visible => false)
-    redirect_to :action => "view", :id => comment.diary_entry.id
+    redirect_to :action => "view", :display_name => entry.diary_entry.user.display_name, :id => comment.diary_entry.id
   end
 private
   ##