Skip to content

Commit

Permalink
Fix finder
Browse files Browse the repository at this point in the history
  • Loading branch information
aljesusg committed Feb 23, 2018
1 parent 57a1494 commit 7d1fffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/v1/spins_controller.rb
Expand Up @@ -20,7 +20,7 @@ def index
else
@spins = Spin.where(visible: true)
end
@spins = @spins.where("'name' ILIKE ?", "%#{params[:name]}%") if params[:name]
@spins = @spins.where("name ILIKE ?", "%#{params[:name]}%") if params[:name]
@spins = @spins.joins(:user).where("users.github_login ILIKE ?", "%#{params[:author]}%") if params[:author]
@spins = @spins.order("#{params[:sort]} #{params[:order] || 'DESC'}") if params[:sort]
if @spins.count.positive?
Expand Down

0 comments on commit 7d1fffd

Please sign in to comment.