enhance show or new wpages; move wpage preview code to helper

This commit is contained in:
Toks
2013-05-11 08:31:03 -04:00
parent 189544f66f
commit f972ee53c0
5 changed files with 25 additions and 14 deletions

View File

@@ -69,6 +69,9 @@ class WikiPagesController < ApplicationController
@wiki_page = WikiPage.find_by_title(params[:title])
if @wiki_page
redirect_to wiki_page_path(@wiki_page)
else
@wiki_page = WikiPage.new(params[:wiki_page])
respond_with(@wiki_page)
end
end