From 3cfbbc0c0b2d2e44b95c6431289a0171ca835511 Mon Sep 17 00:00:00 2001 From: Jez Caudle Date: Sun, 17 Jul 2022 18:01:19 +0100 Subject: [PATCH] Slowly getting there. --- app/views/layouts/application.html.erb | 5 +++-- config/routes.rb | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) 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