Add ability to Search issues
This commit is contained in:
parent
86021a7dc3
commit
5b284f6adf
7 changed files with 61 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue