Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinnie Okada <vokada@mrvinn.com>2015-01-24 21:02:58 +0300
committerVinnie Okada <vokada@mrvinn.com>2015-02-14 21:09:23 +0300
commit76aad9b76ed756ca9ba2cbcdb399c815e542b3ae (patch)
tree7226e0ce64796abbf4848582baed8d173ddecd14 /app/controllers/projects/wikis_controller.rb
parent5725b6daad2f403f13112cfcafa5b45ac126c0ca (diff)
Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2: * Use nested resources to avoid slashes in arguments to path helpers.
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r--app/controllers/projects/wikis_controller.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb
index 0145207bf6f..69824dca944 100644
--- a/app/controllers/projects/wikis_controller.rb
+++ b/app/controllers/projects/wikis_controller.rb
@@ -45,7 +45,7 @@ class Projects::WikisController < Projects::ApplicationController
return render('empty') unless can?(current_user, :write_wiki, @project)
if @page.update(content, format, message)
- redirect_to [@project, @page], notice: 'Wiki was successfully updated.'
+ redirect_to [@project.namespace.becomes(Namespace), @project, @page], notice: 'Wiki was successfully updated.'
else
render 'edit'
end
@@ -55,7 +55,10 @@ class Projects::WikisController < Projects::ApplicationController
@page = WikiPage.new(@project_wiki)
if @page.create(wiki_params)
- redirect_to project_wiki_path(@project, @page), notice: 'Wiki was successfully updated.'
+ redirect_to(
+ namespace_project_wiki_path(@project.namespace, @project, @page),
+ notice: 'Wiki was successfully updated.'
+ )
else
render action: "edit"
end
@@ -65,7 +68,10 @@ class Projects::WikisController < Projects::ApplicationController
@page = @project_wiki.find_page(params[:id])
unless @page
- redirect_to(project_wiki_path(@project, :home), notice: "Page not found")
+ redirect_to(
+ namespace_project_wiki_path(@project.namespace, @project, :home),
+ notice: "Page not found"
+ )
end
end
@@ -73,7 +79,10 @@ class Projects::WikisController < Projects::ApplicationController
@page = @project_wiki.find_page(params[:id])
@page.delete if @page
- redirect_to project_wiki_path(@project, :home), notice: "Page was successfully deleted"
+ redirect_to(
+ namespace_project_wiki_path(@project.namespace, @project, :home),
+ notice: "Page was successfully deleted"
+ )
end
def git_access