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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user