diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-14 23:47:06 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-03 02:11:51 +0900 |
commit | d74a04c499d511d6fec8d1f0ddcfc087596b9224 (patch) | |
tree | cc84b695f28c9849e0d3ed738ea0331aceee7944 /app/finders | |
parent | 959b4e99c0a81ad7b974ab3871f4b1857da9bfc4 (diff) | |
download | gitlab-ce-d74a04c499d511d6fec8d1f0ddcfc087596b9224.tar.gz |
Avoid hardcode table name
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/pipelines_finder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/pipelines_finder.rb b/app/finders/pipelines_finder.rb index f6532377374..5e50eb46c7e 100644 --- a/app/finders/pipelines_finder.rb +++ b/app/finders/pipelines_finder.rb @@ -82,7 +82,7 @@ class PipelinesFinder def by_name(items) if params[:name].present? - items.joins(:user).where("users.name = ?", params[:name]) + items.joins(:user).where(users: { name: params[:name] }) else items end @@ -90,7 +90,7 @@ class PipelinesFinder def by_username(items) if params[:username].present? - items.joins(:user).where("users.username = ?", params[:username]) + items.joins(:user).where(users: { username: params[:username] }) else items end |