summaryrefslogtreecommitdiffstats
path: root/app/controllers/wiki_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-11 19:39:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-11 19:39:47 +0000
commit8ab9215ea8df2216ccfacf272804811b05ab82c8 (patch)
treeac9ab871a1f9fc1a190cd6505ee08e8efacf8863 /app/controllers/wiki_controller.rb
parent60d06d8c17290f536cf76ffd4a75bdafe540aa9a (diff)
downloadredmine-8ab9215ea8df2216ccfacf272804811b05ab82c8.tar.gz
redmine-8ab9215ea8df2216ccfacf272804811b05ab82c8.zip
Use named routes in controllers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10983 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/wiki_controller.rb')
-rw-r--r--app/controllers/wiki_controller.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 115f61157..6d3b44636 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -160,10 +160,10 @@ class WikiController < ApplicationController
call_hook(:controller_wiki_edit_after_save, { :params => params, :page => @page})
respond_to do |format|
- format.html { redirect_to :action => 'show', :project_id => @project, :id => @page.title }
+ format.html { redirect_to project_wiki_page_path(@project, @page.title) }
format.api {
if was_new_page
- render :action => 'show', :status => :created, :location => url_for(:controller => 'wiki', :action => 'show', :project_id => @project, :id => @page.title)
+ render :action => 'show', :status => :created, :location => project_wiki_page_path(@project, @page.title)
else
render_api_ok
end
@@ -200,13 +200,13 @@ class WikiController < ApplicationController
@original_title = @page.pretty_title
if request.post? && @page.update_attributes(params[:wiki_page])
flash[:notice] = l(:notice_successful_update)
- redirect_to :action => 'show', :project_id => @project, :id => @page.title
+ redirect_to project_wiki_page_path(@project, @page.title)
end
end
def protect
@page.update_attribute :protected, params[:protected]
- redirect_to :action => 'show', :project_id => @project, :id => @page.title
+ redirect_to project_wiki_page_path(@project, @page.title)
end
# show page history
@@ -262,7 +262,7 @@ class WikiController < ApplicationController
end
@page.destroy
respond_to do |format|
- format.html { redirect_to :action => 'index', :project_id => @project }
+ format.html { redirect_to project_wiki_index_path(@project) }
format.api { render_api_ok }
end
end
@@ -272,7 +272,7 @@ class WikiController < ApplicationController
@content = @page.content_for_version(params[:version])
@content.destroy
- redirect_to_referer_or :action => 'history', :id => @page.title, :project_id => @project
+ redirect_to_referer_or history_project_wiki_page_path(@project, @page.title)
end
# Export wiki to a single pdf or html file