Allow changine of format in Wiki#update_page.

This commit is contained in:
Tom Preston-Werner
2010-07-13 15:24:12 -07:00
parent 77791940a5
commit 90ba8476b2
5 changed files with 101 additions and 26 deletions
+3 -2
View File
@@ -297,10 +297,11 @@ exist) and commit the change. The file will be written at the repo root.
wiki.write_page('Page Name', :markdown, 'Page contents', commit)
Update an existing page (keeps the same name, format, and directory location).
Update an existing page. If the format is different than the page's current
format, the file name will be changed to reflect the new format.
page = wiki.page('Page Name')
wiki.update_page(page, 'Page contents', commit)
wiki.update_page(page, page.format, 'Page contents', commit)
To delete a page and commit the change: