diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f67d1ae5..ceb70ab9 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -33,8 +33,8 @@ class UsersController < ApplicationController sort_init 'login', 'asc' sort_update - @status = params[:status] ? params[:status].to_i : 1 - conditions = nil + @status = params[:status] ? params[:status].to_i : 1 + conditions = "status <> 0" conditions = ["status=?", @status] unless @status == 0 @user_count = User.count(:conditions => conditions) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 9dc87c5c..7bd13716 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -17,7 +17,7 @@ module UsersHelper def status_options_for_select(selected) - options_for_select([[l(:label_all), "*"], + options_for_select([[l(:label_all), ''], [l(:status_active), 1], [l(:status_registered), 2], [l(:status_locked), 3]], selected) diff --git a/app/views/users/list.rhtml b/app/views/users/list.rhtml index 50054c98..7415af30 100644 --- a/app/views/users/list.rhtml +++ b/app/views/users/list.rhtml @@ -4,11 +4,10 @@