Commit 09dd2501 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs-fix-syntax' into 'master'

docs: fix wrong example to sort artifacts

See merge request gitlab-org/gitlab!71460
parents 9477cff7 dc42ba8b
...@@ -446,10 +446,10 @@ List the artifacts for a single project, sorted by artifact size. The output inc ...@@ -446,10 +446,10 @@ List the artifacts for a single project, sorted by artifact size. The output inc
- on-disk location of the artifact - on-disk location of the artifact
```ruby ```ruby
p = Project.find_by_id(:project ID) p = Project.find_by_id(<project_id>)
arts = Ci::JobArtifact.where(project: p) arts = Ci::JobArtifact.where(project: p)
list = arts.order('sort DESC').limit(50).each do |art| list = arts.order(size: :desc).limit(50).each do |art|
puts "Job ID: #{art.job_id} - Size: #{art.size}b - Type: #{art.file_type} - Created: #{art.created_at} - File loc: #{art.file}" puts "Job ID: #{art.job_id} - Size: #{art.size}b - Type: #{art.file_type} - Created: #{art.created_at} - File loc: #{art.file}"
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