Commit d74a04c4 authored by Shinya Maeda's avatar Shinya Maeda

Avoid hardcode table name

parent 959b4e99
......@@ -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
......
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