Fixed: can't preview/save the very first wiki page.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@726 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-09-14 11:35:47 +00:00
parent 21c97c6a13
commit 8929bfca63
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ class Wiki < ActiveRecord::Base
# find the page with the given title # find the page with the given title
# if page doesn't exist, return a new page # if page doesn't exist, return a new page
def find_or_new_page(title) def find_or_new_page(title)
title = start_page if title.blank?
find_page(title) || WikiPage.new(:wiki => self, :title => Wiki.titleize(title)) find_page(title) || WikiPage.new(:wiki => self, :title => Wiki.titleize(title))
end end