Commit 4647c6fa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

parent ec1a4267
...@@ -37,7 +37,12 @@ class RefsController < ApplicationController ...@@ -37,7 +37,12 @@ class RefsController < ApplicationController
def blob def blob
if @tree.is_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 else
head(404) head(404)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment