sort for queries and responses

This commit is contained in:
Harry Bomrah 2015-08-25 19:48:07 +08:00
parent 771d7d8d4c
commit 275a7b1021
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
Response
</h4>
<div <%= @ticket.ticket_queries.count == (query_counter + 1) ? "id=response-container" : "" %>>
<%= render :partial => "response", :collection => query.ticket_query_responses %>
<%= render :partial => "response", :collection => query.ticket_query_responses.desc(:created_at) %>
</div>
<% if params[:reopen] != "true" && @ticket.ticket_queries.count == (query_counter + 1) %>
<div id="form_container" class="ticket-editor">

View File

@ -138,7 +138,7 @@
</div>
<div id="query_box" class="ticket-content">
<%= render :partial => "query", :collection => @ticket.ticket_queries %>
<%= render :partial => "query", :collection => @ticket.ticket_queries.desc(:created_at) %>
</div>
<% if params[:reopen] == "true"%>
<% if @ticket.status == "closed" %>