```ruby
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
```

Remove stray article catgory check
user
```ruby
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
```
assistant