summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/snippets_actions.rb
diff options
context:
space:
mode:
authorhaseeb <haseebeqx@yahoo.com>2018-02-06 19:03:18 +0530
committerhaseeb <haseebeqx@yahoo.com>2018-02-28 18:48:26 +0530
commit27e8d38cea92d165a2e8400b25df23f408b4dca0 (patch)
tree0a16f63c8f380c92fb4185ca21ba8a264c572641 /app/controllers/concerns/snippets_actions.rb
parent56af0631c6c6d838301ac068f2e79b8f4de9fda7 (diff)
downloadgitlab-ce-27e8d38cea92d165a2e8400b25df23f408b4dca0.tar.gz
embedded snippets support
Diffstat (limited to 'app/controllers/concerns/snippets_actions.rb')
-rw-r--r--app/controllers/concerns/snippets_actions.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/concerns/snippets_actions.rb b/app/controllers/concerns/snippets_actions.rb
index 9095cc7f783..120614739aa 100644
--- a/app/controllers/concerns/snippets_actions.rb
+++ b/app/controllers/concerns/snippets_actions.rb
@@ -17,6 +17,10 @@ module SnippetsActions
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
+ def js_request?
+ request.format.js?
+ end
+
private
def convert_line_endings(content)