Commit fac22578 authored by Marin Jankovski's avatar Marin Jankovski

A bit clearer naming for gollum_wiki.

parent 5a949e60
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment