Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-02-06 18:04:00 +0300
committerJarka Kadlecova <jarka@gitlab.com>2017-02-20 09:24:03 +0300
commitc9d687d6fed8ee9d0b9dfd1ebb55ddbb30b39fe2 (patch)
tree9ae2c095936d3c128401e72fc52d0d583aa3b1dc /app/controllers/projects/snippets_controller.rb
parentb88e82ff0a1bca9687b5579208ba05a99e41a464 (diff)
Download snippets with LF line-endings by default
Diffstat (limited to 'app/controllers/projects/snippets_controller.rb')
-rw-r--r--app/controllers/projects/snippets_controller.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/app/controllers/projects/snippets_controller.rb b/app/controllers/projects/snippets_controller.rb
index 5d193f26a8e..ef5d3d242eb 100644
--- a/app/controllers/projects/snippets_controller.rb
+++ b/app/controllers/projects/snippets_controller.rb
@@ -1,6 +1,7 @@
class Projects::SnippetsController < Projects::ApplicationController
include ToggleAwardEmoji
include SpammableActions
+ include SnippetsActions
before_action :module_enabled
before_action :snippet, only: [:show, :edit, :destroy, :update, :raw, :toggle_award_emoji, :mark_as_spam]
@@ -49,9 +50,6 @@ class Projects::SnippetsController < Projects::ApplicationController
end
end
- def edit
- end
-
def update
UpdateSnippetService.new(project, current_user, @snippet,
snippet_params).execute
@@ -74,15 +72,6 @@ class Projects::SnippetsController < Projects::ApplicationController
redirect_to namespace_project_snippets_path(@project.namespace, @project)
end
- def raw
- send_data(
- @snippet.content,
- type: 'text/plain; charset=utf-8',
- disposition: 'inline',
- filename: @snippet.sanitized_file_name
- )
- end
-
protected
def snippet