|
|
|
@ -44,7 +44,8 @@ class MessagesController < ApplicationController
|
|
|
|
|
@current_user = current_user || nil
|
|
|
|
|
|
|
|
|
|
@messages = @message.children.preload_messages.includes(:message_detail, :praise_treads)
|
|
|
|
|
@messages = @messages.ordered(sort: 1) unless @message.parent_id.nil?
|
|
|
|
|
# @messages = @messages.ordered(sort: 1) unless @message.parent_id.nil?
|
|
|
|
|
@messages = @messages.order("created_on desc")
|
|
|
|
|
|
|
|
|
|
@user_course_identity = current_user.course_identity(@message.board.course)
|
|
|
|
|
case @user_course_identity
|
|
|
|
|