Added diff

This commit is contained in:
Wedge 2016-02-16 19:07:52 +03:00
parent a82b6adc14
commit fd6d9293f6
2 changed files with 6 additions and 9 deletions

View File

@ -4,6 +4,10 @@ class Projects::Project::ProjectController < Projects::Project::BaseController
end
def commit
redirect_to @project.github_data.html_url + "/commit/" + params[:sha]
redirect_to 'https://github.com/' + @project.github_get_organization + '/' + @project.name + '/commit/' + params[:sha]
end
def diff
redirect_to 'https://github.com/' + @project.github_get_organization + '/' + @project.name + '/commit/' + params[:diff]
end
end

View File

@ -325,14 +325,7 @@ Rails.application.routes.draw do
get '/' => 'project/project#index', as: :project
get '/commit/:sha' => 'project/project#commit', as: :commit
get '/tree' => 'project/project#index', as: :tree
get '/tree2' => 'project/project#index', as: :project_issues
get '/tree3' => 'project/project#index', as: :project_pull_requests
get '/tree4' => 'project/project#index', as: :archive
get '/tree5' => 'project/project#index', as: :commits
get '/tree6' => 'project/project#index', as: :branch
get '/tree7' => 'project/project#index', as: :tags
get '/diff/:diff' => 'project/project#diff', as: :diff, format: false, diff: /.*/
end
end