排序问题

dev_local_lzdx
daiao 5 years ago
parent aec65c6284
commit a018f5a4ad

@ -29,7 +29,7 @@ class ManagementsController < ApplicationController
end
def user_agents
@user_agents = UserAgent.where("user_agents.key is not null and is_delete = 0").order("action_status asc, register_status asc")
@user_agents = UserAgent.where("user_agents.key is not null and is_delete = 0").order("created_at desc")
@agents_count = @user_agents.count
limit = 20
@agents_pages = Paginator.new @agents_count, limit, params['page'] || 1

@ -13,7 +13,7 @@
<tbody>
<% @user_agents.each do |ua| %>
<% user = User.find_by_login(ua.key) %>
<% user_extension = user.extensions %>
<% user_extension = user.user_extensions %>
<% school = user_extension.school %>
<tr>
<td><%= ua.id %></td>

Loading…
Cancel
Save