Fulltext search for packages works
This commit is contained in:
parent
8df03296e9
commit
acd47f66d7
3 changed files with 17 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
class PackagesController < ApplicationController
|
||||
def index
|
||||
@packages = Package.order('name').first(20)
|
||||
query = '%'+params[:search]+'%'
|
||||
@packages = Package.where("description like ? or name like ?", query, query).order('name').first(20)
|
||||
end
|
||||
|
||||
def with_screenshots
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue