diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-14 11:37:29 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-14 11:37:29 +0400 |
commit | 8543313bf5396afe3bdf5851a84c688eacc8156f (patch) | |
tree | 79abccc9e6ce690f93174a39d0c45cbd08bf1ccc /app/controllers/admin | |
parent | 68bfcd0521020d9f0154ffe767aa1e327e93ca24 (diff) |
Few more filters for admin / projects
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index aa9e2f69a04..64aa6882b45 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -5,6 +5,8 @@ class Admin::ProjectsController < AdminController @projects = Project.scoped @projects = @projects.where(namespace_id: params[:namespace_id]) if params[:namespace_id].present? @projects = @projects.where(public: true) if params[:public_only].present? + @projects = @projects.joins(:events).where('events.action = ?', Event::Pushed) if params[:with_push].present? + @projects = @projects.abandoned if params[:abandoned].present? @projects = @projects.where(namespace_id: nil) if params[:namespace_id] == Namespace.global_id @projects = @projects.search(params[:name]) if params[:name].present? @projects = @projects.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page]).per(20) |