diff --git a/hello_app/app/controllers/application_controller.rb b/hello_app/app/controllers/application_controller.rb index d83690e..a5b5748 100644 --- a/hello_app/app/controllers/application_controller.rb +++ b/hello_app/app/controllers/application_controller.rb @@ -2,4 +2,8 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception + + def hello + render html: "ahoy there" + end end diff --git a/hello_app/config/routes.rb b/hello_app/config/routes.rb index 3f66539..d1e5d11 100644 --- a/hello_app/config/routes.rb +++ b/hello_app/config/routes.rb @@ -1,4 +1,5 @@ Rails.application.routes.draw do + root 'application#hello' # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes".