summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/snippets_actions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/concerns/snippets_actions.rb')
-rw-r--r--app/controllers/concerns/snippets_actions.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/concerns/snippets_actions.rb b/app/controllers/concerns/snippets_actions.rb
index 014232a7d05..bf2683034a8 100644
--- a/app/controllers/concerns/snippets_actions.rb
+++ b/app/controllers/concerns/snippets_actions.rb
@@ -8,13 +8,13 @@ module SnippetsActions
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def raw
- disposition = params[:inline] == 'false' ? 'attachment' : 'inline'
+ disposition = params[:inline] == "false" ? "attachment" : "inline"
workhorse_set_content_type!
send_data(
convert_line_endings(@snippet.content),
- type: 'text/plain; charset=utf-8',
+ type: "text/plain; charset=utf-8",
disposition: disposition,
filename: @snippet.sanitized_file_name
)
@@ -28,6 +28,6 @@ module SnippetsActions
private
def convert_line_endings(content)
- params[:line_ending] == 'raw' ? content : content.gsub(/\r\n/, "\n")
+ params[:line_ending] == "raw" ? content : content.gsub(/\r\n/, "\n")
end
end