diff options
author | Walmyr Filho <wlsf82@gmail.com> | 2019-01-02 12:33:46 +0100 |
---|---|---|
committer | Walmyr Filho <wlsf82@gmail.com> | 2019-01-02 12:33:46 +0100 |
commit | 00e07e418804e7b69e1b32b74834e6aa0aa21c24 (patch) | |
tree | 9ce72e76ece7bfe5c7c5153fda834a9bc1b0b292 /app/controllers/snippets_controller.rb | |
parent | de008c132f6228793e8a9a8431dce65009075134 (diff) | |
parent | 191f461b88ba80069c2b23229cc0e26253d4fcc7 (diff) | |
download | gitlab-ce-wlsf82-branches-crud-test.tar.gz |
Merge remote-tracking branch 'upstream/master'wlsf82-branches-crud-test
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index dd9bf17cf0c..8ea5450b4e8 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -80,7 +80,13 @@ class SnippetsController < ApplicationController render_blob_json(blob) end - format.js { render 'shared/snippets/show' } + format.js do + if @snippet.embeddable? + render 'shared/snippets/show' + else + head :not_found + end + end end end |