foodsoft/app/controllers/admin/users_controller.rb

13 lines
314 B
Ruby
Raw Normal View History

class Admin::UsersController < Admin::BaseController
2011-06-09 22:03:27 +02:00
inherit_resources
def index
@users = User.natural_order
2011-06-09 22:03:27 +02:00
# if somebody uses the search field:
@users = @users.natural_search(params[:user_name]) unless params[:user_name].blank?
2011-06-09 22:03:27 +02:00
@users = @users.page(params[:page]).per(@per_page)
end
end