Add a "patch" MIME type, and render it like a normal view in Commit#show
This commit is contained in:
parent
c058e3903e
commit
99d391332f
4 changed files with 17 additions and 22 deletions
|
@ -25,15 +25,4 @@ class CommitsController < ApplicationController
|
|||
format.atom { render layout: false }
|
||||
end
|
||||
end
|
||||
|
||||
def patch
|
||||
@commit = project.commit(params[:id])
|
||||
|
||||
send_data(
|
||||
@commit.to_patch,
|
||||
type: "text/plain",
|
||||
disposition: 'attachment',
|
||||
filename: "#{@commit.id}.patch"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue