Explicitly stated order of threadreplies
This commit is contained in:
@@ -12,9 +12,9 @@ class ForumthreadsController < ApplicationController
|
|||||||
end
|
end
|
||||||
def show
|
def show
|
||||||
if params[:reverse] == "true"
|
if params[:reverse] == "true"
|
||||||
@replies = @thread.replies.reverse_order.page(params[:page])
|
@replies = @thread.replies.order(created_at: :desc).page(params[:page])
|
||||||
else
|
else
|
||||||
@replies = @thread.replies.page(params[:page])
|
@replies = @thread.replies.order(:created_at).page(params[:page])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user