diff options
Diffstat (limited to 'app/controllers/refs_controller.rb')
| -rw-r--r-- | app/controllers/refs_controller.rb | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/app/controllers/refs_controller.rb b/app/controllers/refs_controller.rb index cbe87514a2d..0da429b8bde 100644 --- a/app/controllers/refs_controller.rb +++ b/app/controllers/refs_controller.rb @@ -8,6 +8,16 @@ class RefsController < ApplicationController    before_filter :authorize_read_project!    before_filter :require_non_empty_project +  def switch  +    new_path = if params[:destination] == "tree" +                 tree_project_ref_path(@project, params[:ref])  +               else +                 project_commits_path(@project, :ref => params[:ref]) +               end + +    redirect_to new_path +  end +    #    # Repository preview    # | 
