Add a "patch" MIME type, and render it like a normal view in Commit#show

This commit is contained in:
Robert Speicher 2012-09-25 18:46:19 -04:00
parent c058e3903e
commit 99d391332f
4 changed files with 17 additions and 22 deletions

View file

@ -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