Skip to content
Snippets Groups Projects
Commit 4647c6fa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

fixes raw view for text files with code like *.rb

parent ec1a4267
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -37,7 +37,12 @@ class RefsController < ApplicationController
 
def blob
if @tree.is_blob?
send_data(@tree.data, :type => @tree.mime_type, :disposition => 'inline', :filename => @tree.name)
send_data(
@tree.data,
:type => @tree.text? ? "text/plain" : @tree.mime_type,
:disposition => 'inline',
:filename => @tree.name
)
else
head(404)
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment