最近登录报500

This commit is contained in:
cxt 2016-01-25 10:16:33 +08:00
parent 21bdbe98a9
commit 4465e93dae
2 changed files with 3 additions and 3 deletions

View File

@ -461,8 +461,8 @@ class AdminController < ApplicationController
scope = User.order('last_login_on desc')
scope = scope.where("last_login_on>= '#{params[:startdate]} 00:00:00'") if params[:startdate].present?
scope =scope.where("last_login_on <= '#{params[:enddate]} 23:59:59'") if params[:enddate].present?
@user = scope
@user = paginateHelper @user,30
@users = scope
@users = paginateHelper @users,30
@page = (params['page'] || 1).to_i - 1
respond_to do |format|
format.html

View File

@ -47,7 +47,7 @@
</thead>
<tbody>
<% @count=@page * 30 %>
<% for user in @user do %>
<% for user in @users do %>
<tr>
<% @count +=1 %>
<td align="center">