Fix blob controller rendering in case of errors
This commit is contained in:
parent
752cb506c0
commit
ed91378627
|
|
@ -28,7 +28,7 @@ class Projects::BlobController < Projects::ApplicationController
|
||||||
redirect_to project_blob_path(@project, File.join(@ref, file_path))
|
redirect_to project_blob_path(@project, File.join(@ref, file_path))
|
||||||
else
|
else
|
||||||
flash[:alert] = result[:message]
|
flash[:alert] = result[:message]
|
||||||
render :show
|
render :new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ class Projects::BlobController < Projects::ApplicationController
|
||||||
redirect_to after_edit_path
|
redirect_to after_edit_path
|
||||||
else
|
else
|
||||||
flash[:alert] = result[:message]
|
flash[:alert] = result[:message]
|
||||||
render :show
|
render :edit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -284,11 +284,11 @@ module SharedPaths
|
||||||
end
|
end
|
||||||
|
|
||||||
step 'I am on the new file page' do
|
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
|
end
|
||||||
|
|
||||||
step 'I am on the ".gitignore" edit file page' do
|
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')))
|
@project, File.join(root_ref, '.gitignore')))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue