controllers: set @current_item globally in respond_with.

This commit is contained in:
evazion
2020-01-29 21:30:43 -06:00
parent 6b066f2cab
commit c7185724d5
20 changed files with 25 additions and 25 deletions

View File

@@ -26,7 +26,6 @@ class WikiPagesController < ApplicationController
def show
@wiki_page, found_by = WikiPage.find_by_id_or_title(params[:id])
@current_item = @wiki_page
if request.format.html? && @wiki_page.blank? && found_by == :title
@wiki_page = WikiPage.new(title: params[:id])
respond_with @wiki_page, status: 404