Fixed that viewing/editing a wiki page without WikiContent raises an error (#14986).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12220 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-10-13 11:19:47 +00:00
parent 94e7df78ca
commit 5f747faa58
3 changed files with 35 additions and 12 deletions
+2 -1
View File
@@ -175,9 +175,10 @@ class WikiPage < ActiveRecord::Base
end
# Saves the page and its content if text was changed
def save_with_content
def save_with_content(content)
ret = nil
transaction do
self.content = content
if new_record?
# Rails automatically saves associated content
ret = save