Slowly getting there.

This commit is contained in:
Jez Caudle 2022-07-17 18:01:19 +01:00
parent dc739cc189
commit 3cfbbc0c0b
2 changed files with 8 additions and 3 deletions

View File

@ -11,8 +11,6 @@
</head> </head>
<body> <body>
<header> <header>
<% if notice %><p class="notice"><%= notice %></p><% end %>
<% if alert %><p class="alert"><%= alert %></p><% end %>
<nav> <nav>
<a href="/">Home</a> <a href="/">Home</a>
<% if !user_signed_in? %> <% if !user_signed_in? %>
@ -22,6 +20,9 @@
<% end %> <% end %>
</nav> </nav>
</header> </header>
<% if notice or alert %>
<% if notice %><p class="notice"><%= notice %></p><% end %><% if alert %><p class="alert"><%= alert %></p><% end %>
<% end %>
<%= yield %> <%= yield %>
</body> </body>
</html> </html>

View File

@ -6,8 +6,12 @@ Rails.application.routes.draw do
resources :cafs resources :cafs
end 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 # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
# Defines the root path route ("/") # Defines the root path route ("/")
root "home#index" root to: redirect('/users/sign_in')
end end