Skip to content

Commit

Permalink
Merge pull request #6 from shazam442/routing-24-10-16
Browse files Browse the repository at this point in the history
root route to posts#index
  • Loading branch information
shazam442 authored Oct 16, 2024
2 parents 76dda88 + 98c0881 commit 48f8cf8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
3 changes: 0 additions & 3 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
class PagesController < ApplicationController
def home
end

def about
end
end
3 changes: 0 additions & 3 deletions app/views/layouts/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
<li class="nav-item">
<%= link_to 'Home', root_path, class: "nav-link" %>
</li>
<li class="nav-item">
<%= link_to 'Blog', posts_path, class: "nav-link" %>
</li>
<li class="nav-item">
<%= link_to 'About', about_path, class: "nav-link" %>
</li>
Expand Down
5 changes: 0 additions & 5 deletions app/views/pages/home.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
get "manifest" => "rails/pwa#manifest", as: :pwa_manifest

# Defines the root path route ("/")
root "pages#home"
root "posts#index"
end

0 comments on commit 48f8cf8

Please sign in to comment.