[issue #27] Added using of new BuildList scope in controller

This commit is contained in:
George Vinogradov 2011-12-13 04:27:03 +04:00
parent 43feb029cd
commit 461cf3fd8e
1 changed files with 4 additions and 2 deletions

View File

@ -13,11 +13,13 @@ class BuildListsController < ApplicationController
def all
if params[:filter]
@filter = BuildList::Filter.new(nil, params[:filter])
@build_lists = @filter.find.paginate :page => params[:page]
else
@filter = BuildList::Filter.new(nil)
@build_lists = BuildList.recent.paginate :page => params[:page]
end
@build_lists = @filter.find
@build_lists = @build_lists.scoped_open_to_user_with_groups(current_user) unless current_user.admin?
@build_lists = @build_lists.paginate :page => params[:page]
@action_url = all_build_lists_path
@build_server_status = begin