Skip to content

Commit

Permalink
Add no header option to application layout
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlON committed Jan 29, 2017
1 parent 08b30f0 commit c22eb85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
class PagesController < ApplicationController
def index
if !user_signed_in?
render :user_not_signed_in, layout: false
@no_header = true
render :user_not_signed_in
elsif !current_user.room?
render :user_has_no_room
end
Expand Down
3 changes: 2 additions & 1 deletion app/views/layouts/application.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ html
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
body
= render 'layouts/header'
- unless @no_header
= render 'layouts/header'
= render 'layouts/notifications'
= yield
2 changes: 0 additions & 2 deletions app/views/pages/user_not_signed_in.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
= render 'layouts/notifications'

h1 Welcome to room538

= link_to 'Sign up', new_user_registration_path
Expand Down

0 comments on commit c22eb85

Please sign in to comment.