diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e18f8cf..f08bb46 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,8 +11,6 @@
- <% if notice %>

<%= notice %>

<% end %> - <% if alert %>

<%= alert %>

<% end %>
+ <% if notice or alert %> + <% if notice %>

<%= notice %>

<% end %><% if alert %>

<%= alert %>

<% end %> + <% end %> <%= yield %> diff --git a/config/routes.rb b/config/routes.rb index 22e54a6..a985844 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,8 +6,12 @@ Rails.application.routes.draw do resources :cafs end + authenticated :user do + root to: 'home#index', as: :authenticated_root + end + # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html # Defines the root path route ("/") - root "home#index" + root to: redirect('/users/sign_in') end