summaryrefslogtreecommitdiff
path: root/app/controllers/admin/builds_controller.rb
blob: 64f9da280f0ce23fbd6149b262ede537b8987dc5 (plain)
1
2
3
4
5
6
7
8
9
10
class Admin::BuildsController < Admin::ApplicationController
  def index
    @scope = params[:scope]
    @builds = Build.order('created_at DESC').page(params[:page]).per(30)

    if ["pending", "running"].include? @scope
      @builds = @builds.send(@scope)
    end
  end
end