4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/foodcoop/users_controller.rb', line 4
def index
@users = User.undeleted.sort_by_param(params['sort'])
@users = @users.natural_search(params[:user_name]) if params[:user_name].present?
if params[:ordergroup_name]
@users = @users.joins(:groups).where("groups.type = 'Ordergroup' AND groups.name LIKE ?",
"%#{params[:ordergroup_name]}%")
end
@users = @users.page(params[:page]).per(@per_page)
respond_to do |format|
format.html format.js { render layout: false } end
end
|