Skip to content

Commit

Permalink
Fix postgres search error.
Browse files Browse the repository at this point in the history
  • Loading branch information
axilleas committed Aug 3, 2014
1 parent 44c74f6 commit 1980774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/searches_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class SearchesController < ApplicationController
def index
@page_title = 'Search'
searchphrase = params[:id]
@results = RubyGem.where('name LIKE ?', "%#{searchphrase}%").paginate(page: params[:page], per_page: 50, group: 'name', order: 'length(name) asc')
@results = RubyGem.where('name LIKE ?', "%#{searchphrase}%").paginate(page: params[:page], per_page: 50, order: 'length(name) asc')
@suggests = []
if @results == []
all_gems = RubyGem.select('name').map { |x| x.name }
Expand Down

0 comments on commit 1980774

Please sign in to comment.