Add ability to Search issues

This commit is contained in:
Adam Leonard 2011-10-22 00:06:38 -04:00
parent 86021a7dc3
commit 5b284f6adf
7 changed files with 61 additions and 11 deletions

View file

@ -78,6 +78,13 @@ class IssuesController < ApplicationController
render :nothing => true
end
def search
@project = Project.find(params['project'])
@issues = @project.issues.where("title LIKE ? OR content LIKE ?", "%#{params['terms']}%", "%#{params['terms']}%")
render :partial => 'issues'
end
protected
def issue