diff options
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r-- | app/models/wiki_page.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 535bfb5b28a..b8a0a9eb58b 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -175,7 +175,8 @@ class WikiPage end def save(method, *args) - if valid? && wiki.send(method, *args) + project_wiki = wiki + if valid? && project_wiki.send(method, *args) page_details = if method == :update_page @page.path @@ -183,14 +184,15 @@ class WikiPage title end - page_title, page_dir = wiki.page_title_and_dir(page_details) - @page = wiki.wiki.paged(page_title, page_dir) + page_title, page_dir = project_wiki.page_title_and_dir(page_details) + gollum_wiki = project_wiki.wiki + @page = gollum_wiki.paged(page_title, page_dir) set_attributes @persisted = true else - errors.add(:base, wiki.error_message) if wiki.error_message + errors.add(:base, project_wiki.error_message) if project_wiki.error_message @persisted = false end @persisted |