diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-10-03 13:34:24 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-10-03 13:34:24 +0300 |
commit | 8cbfe3aea64a11f8de0e28e35fc1fc298128158e (patch) | |
tree | a12867e59b7ae7584f3a67a406f832bd7cab7ee8 /app/controllers/projects/artifacts_controller.rb | |
parent | ca0e39048f0e92bd615c45bfe555800910396cfd (diff) |
Redirect to pages daemon
Diffstat (limited to 'app/controllers/projects/artifacts_controller.rb')
-rw-r--r-- | app/controllers/projects/artifacts_controller.rb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb index eb010923466..a8f56acc73b 100644 --- a/app/controllers/projects/artifacts_controller.rb +++ b/app/controllers/projects/artifacts_controller.rb @@ -29,13 +29,17 @@ class Projects::ArtifactsController < Projects::ApplicationController blob = @entry.blob conditionally_expand_blob(blob) - respond_to do |format| - format.html do - render 'file' - end - - format.json do - render_blob_json(blob) + if blob.external_link? + redirect_to blob.external_url(@project, build) + else + respond_to do |format| + format.html do + render 'file' + end + + format.json do + render_blob_json(blob) + end end end end |