Merge pull request #3168 from techAPJ/patch-2

add class for container div on 404 page
This commit is contained in:
Robin Ward 2015-02-03 15:12:58 -05:00
commit 4c6c021b5c
2 changed files with 2 additions and 1 deletions

View File

@ -376,6 +376,7 @@ class ApplicationController < ActionController::Base
def build_not_found_page(status=404, layout=false)
category_topic_ids = Category.pluck(:topic_id).compact
@container_class = "container not-found-container"
@top_viewed = Topic.where.not(id: category_topic_ids).top_viewed(10)
@recent = Topic.where.not(id: category_topic_ids).recent(10)
@slug = params[:slug].class == String ? params[:slug] : ''

View File

@ -35,7 +35,7 @@
</div>
</div>
</header>
<div id="main-outlet" class="container">
<div id="main-outlet" class="<%= @container_class ? @container_class : 'container' %>">
<%= yield %>
</div>
</section>