Add Compare#index and Compare#create actions
Create just redirects to our specially-formatted #show action
This commit is contained in:
parent
8fe63dab52
commit
6cb626ef51
3 changed files with 13 additions and 1 deletions
|
@ -8,6 +8,9 @@ class CompareController < ApplicationController
|
|||
before_filter :authorize_code_access!
|
||||
before_filter :require_non_empty_project
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
def show
|
||||
result = Commit.compare(project, params[:from], params[:to])
|
||||
|
||||
|
@ -19,4 +22,8 @@ class CompareController < ApplicationController
|
|||
|
||||
@commits = CommitDecorator.decorate(@commits)
|
||||
end
|
||||
|
||||
def create
|
||||
redirect_to project_compare_path(@project, params[:from], params[:to])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue