summaryrefslogtreecommitdiff
path: root/app/controllers/threadreplies_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/threadreplies_controller.rb')
-rw-r--r--app/controllers/threadreplies_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/threadreplies_controller.rb b/app/controllers/threadreplies_controller.rb
index 946155d..a801fbc 100644
--- a/app/controllers/threadreplies_controller.rb
+++ b/app/controllers/threadreplies_controller.rb
@@ -37,7 +37,7 @@ class ThreadrepliesController < ApplicationController
if @reply.update_attributes(reply_params)
@reply.send_new_reply_mail(old_content)
flash[:notice] = "Reply updated!"
- position = @reply.thread.replies.index(@reply)
+ position = @reply.thread.replies.order(:id).index(@reply)
page = position / Kaminari.config.default_per_page + 1
redirect_to forumthread_path(@reply.thread, page: page) + "#reply-#{@reply.id}"
else