class ArticlesController < ApplicationController
  def show
    @article = Article.where(id: params[:id]).first

    if @article.nil?
      # No flash because homepages are page cached
      return redirect_to(home_path)
    end

    if @article_category.nil?
      # No flash because homepages are page cached
      return redirect_to(home_path)
    end

    render layout: !request.xhr?
  end
end

class ArticlesController < ApplicationController
  def show
    @article = Article.where(id: params[:id]).first

    if @article.nil?
      # No flash because homepages are page cached
      return redirect_to(home_path)
    end

    render layout: !request.xhr?
  end
end

Remove stray article catgory check
Remove stray article catgory check
