Using plain if/else is much easier to understand
This commit is contained in:
parent
2c27325e06
commit
df5b78676e
|
@ -5,11 +5,11 @@ class Projects::ArtifactsController < Projects::ApplicationController
|
||||||
before_action :validate_artifacts!
|
before_action :validate_artifacts!
|
||||||
|
|
||||||
def download
|
def download
|
||||||
unless artifacts_file.file_storage?
|
if artifacts_file.file_storage?
|
||||||
return redirect_to artifacts_file.url
|
send_file artifacts_file.path, disposition: 'attachment'
|
||||||
|
else
|
||||||
|
redirect_to artifacts_file.url
|
||||||
end
|
end
|
||||||
|
|
||||||
send_file artifacts_file.path, disposition: 'attachment'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def browse
|
def browse
|
||||||
|
|
Loading…
Reference in New Issue