Commit df5b7867 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Using plain if/else is much easier to understand

parent 2c27325e
...@@ -5,11 +5,11 @@ class Projects::ArtifactsController < Projects::ApplicationController ...@@ -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
......
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