summaryrefslogtreecommitdiff
path: root/app/models/deployment_merge_request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/deployment_merge_request.rb')
-rw-r--r--app/models/deployment_merge_request.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/deployment_merge_request.rb b/app/models/deployment_merge_request.rb
index 7949bd81605..b91785eeb57 100644
--- a/app/models/deployment_merge_request.rb
+++ b/app/models/deployment_merge_request.rb
@@ -12,7 +12,7 @@ class DeploymentMergeRequest < ApplicationRecord
end
def self.by_deployment_id(id)
- where('deployments.id = ?', id)
+ where(deployments: { id: id })
end
def self.deployed_to(name)
@@ -20,7 +20,7 @@ class DeploymentMergeRequest < ApplicationRecord
# (project_id, name), instead of using the index on
# (name varchar_pattern_ops). This results in better performance on
# GitLab.com.
- where('environments.name = ?', name)
+ where(environments: { name: name })
.where('environments.project_id = merge_requests.target_project_id')
end