admin area -> search for projecs
This commit is contained in:
parent
77cf662034
commit
98a45ce6ee
2 changed files with 7 additions and 1 deletions
|
@ -4,7 +4,9 @@ class Admin::ProjectsController < ApplicationController
|
|||
before_filter :authenticate_admin!
|
||||
|
||||
def index
|
||||
@admin_projects = Project.page(params[:page])
|
||||
@admin_projects = Project.scoped
|
||||
@admin_projects = @admin_projects.search(params[:name]) if params[:name].present?
|
||||
@admin_projects = @admin_projects.page(params[:page])
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue