Update empty error messages and warn if not viewing the most recent wiki page

This commit is contained in:
Riyad Preukschas 2013-01-11 21:04:21 +01:00
parent b55ed840e6
commit fd836f5490
4 changed files with 22 additions and 5 deletions

View file

@ -8,14 +8,13 @@ class WikisController < ProjectResourceController
end
def show
@most_recent_wiki = @project.wikis.where(slug: params[:id]).ordered.first
if params[:version_id]
@wiki = @project.wikis.find(params[:version_id])
else
@wiki = @project.wikis.where(slug: params[:id]).ordered.first
@wiki = @most_recent_wiki
end
@note = @project.notes.new(noteable: @wiki)
if @wiki
render 'show'
else