From 9fb226acef7c8ccc6be820633cd1204049c9d48c Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 12 Mar 2014 19:14:19 +0600 Subject: [PATCH] [#345] fix error with quotes --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 78387f751..a35df2298 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -67,7 +67,7 @@ class Project < ActiveRecord::Base scope :by_name, ->(name) { where('projects.name ILIKE ?', name) if name.present? } scope :by_owner_and_name, ->(*params) { term = params.map(&:strip).join('/').downcase - where('lower(concat(owner_uname, '/', name)) ILIKE ?', "%#{term}%") if term.present? + where("lower(concat(owner_uname, '/', name)) ILIKE ?", "%#{term}%") if term.present? } scope :by_visibilities, ->(v) { where(visibility: v) } scope :opened, -> { where(visibility: 'open') }