Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit 80048fa

Browse files
committed
Add home page
1 parent 98cd34d commit 80048fa

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

app/controllers/pages_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class PagesController < ApplicationController
2+
def home
3+
end
4+
end

app/views/pages/home.html.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<ul>
2+
<li><%= link_to 'Modern Todo App(React Redux)', react_todos_path %></li>
3+
<li><%= link_to 'Classical Todo App(Rails MVC)', todos_path %></li>
4+
</ul>

config/routes.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Rails.application.routes.draw do
2+
root to: 'pages#home'
23
resources :todos
34
get 'react/todos', to: 'react_todos#index'
45
end

0 commit comments

Comments
 (0)