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