Commit d74a04c4 authored by Shinya Maeda's avatar Shinya Maeda

Avoid hardcode table name

parent 959b4e99
...@@ -82,7 +82,7 @@ class PipelinesFinder ...@@ -82,7 +82,7 @@ class PipelinesFinder
def by_name(items) def by_name(items)
if params[:name].present? if params[:name].present?
items.joins(:user).where("users.name = ?", params[:name]) items.joins(:user).where(users: { name: params[:name] })
else else
items items
end end
...@@ -90,7 +90,7 @@ class PipelinesFinder ...@@ -90,7 +90,7 @@ class PipelinesFinder
def by_username(items) def by_username(items)
if params[:username].present? if params[:username].present?
items.joins(:user).where("users.username = ?", params[:username]) items.joins(:user).where(users: { username: params[:username] })
else else
items items
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment