Refactor: convert WikiController to a REST resource

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4303 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-10-28 21:25:38 +00:00
parent e7e7a91b85
commit c514dd6885
11 changed files with 35 additions and 40 deletions

View File

@@ -98,7 +98,7 @@ class WikiController < ApplicationController
flash[:error] = l(:notice_locking_conflict)
end
verify :method => :post, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
verify :method => :put, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
# Creates a new page or updates an existing one
def update
@page = @wiki.find_or_new_page(params[:id])
@@ -234,7 +234,7 @@ class WikiController < ApplicationController
return render_403 unless editable?
attachments = Attachment.attach_files(@page, params[:attachments])
render_attachment_warning_if_needed(@page)
redirect_to :action => 'show', :id => @page.title
redirect_to :action => 'show', :id => @page.title, :project_id => @project
end
private