Actions
Defect #27333
closedSwitching SCM fails after validation error in "New repository" page
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Steps to reproduce:
- Open “New repository” ( /projects/:project_name/repositories/new )
- Click the Create button without making any changes.
- Change SCM (e.g. "Subversion" to "Git")
==> The input form does not change at all. As below.
Incorrect form for 'Git' | Correct form for 'Git' |
development.log:
There is an error "ActionController::RoutingError (No route matches [GET] "/projects/:project_name/repositories"):".
You can solve the problem by making the following changes.
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb
index 314c0b29b..435041b72 100644
--- a/app/helpers/repositories_helper.rb
+++ b/app/helpers/repositories_helper.rb
@@ -138,7 +138,7 @@ module RepositoriesHelper
select_tag('repository_scm',
options_for_select(scm_options, repository.class.name.demodulize),
:disabled => (repository && !repository.new_record?),
- :data => {:remote => true, :method => 'get'})
+ :data => {:remote => true, :method => 'get', :url => new_project_repository_path(repository.project)})
end
def with_leading_slash(path)
Files
Actions