From c372914af04268126d1e4a11af1c8d9baa014167 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 23 Jan 2015 23:21:18 -0500 Subject: Create an index page * Add `main` action to HomeController * Set `main` as our root route * Create a view for `main` with dummy text --- app/controllers/home_controller.rb | 2 ++ app/views/home/main.html.erb | 1 + config/routes.rb | 1 + 3 files changed, 4 insertions(+) create mode 100644 app/views/home/main.html.erb diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index fc0b474..82601c1 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,2 +1,4 @@ class HomeController < ApplicationController + def main + end end diff --git a/app/views/home/main.html.erb b/app/views/home/main.html.erb new file mode 100644 index 0000000..b2ebb94 --- /dev/null +++ b/app/views/home/main.html.erb @@ -0,0 +1 @@ +hello from home diff --git a/config/routes.rb b/config/routes.rb index c5c7483..4235143 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,4 @@ Rails.application.routes.draw do + root :to => 'home#main' resources :notes, :except => [:new, :edit] end -- cgit v1.2.3