diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-27 02:12:13 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-27 02:12:13 +0300 |
commit | ed9137862773c8cd242e16a7945cf18a0b2e1ff9 (patch) | |
tree | f275fffc83482ba8585ebbfd517b5c6755fe2069 | |
parent | 752cb506c033c281064abb56093c41a7dac2735a (diff) |
Fix blob controller rendering in case of errors
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 00b82ff1df3..b471d57f698 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -28,7 +28,7 @@ class Projects::BlobController < Projects::ApplicationController redirect_to project_blob_path(@project, File.join(@ref, file_path)) else flash[:alert] = result[:message] - render :show + render :new end end @@ -53,7 +53,7 @@ class Projects::BlobController < Projects::ApplicationController redirect_to after_edit_path else flash[:alert] = result[:message] - render :show + render :edit end end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 33ef6ccacf1..cef48c179b2 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -284,11 +284,11 @@ module SharedPaths end step 'I am on the new file page' do - current_path.should eq(project_new_tree_path(@project, root_ref)) + current_path.should eq(project_create_blob_path(@project, root_ref)) end step 'I am on the ".gitignore" edit file page' do - current_path.should eq(project_edit_tree_path( + current_path.should eq(project_edit_blob_path( @project, File.join(root_ref, '.gitignore'))) end |