From bd85e3c5c464366a1ff4519092ad882c912bc574 Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Wed, 6 Nov 2019 04:53:17 -0800 Subject: [PATCH] Add tutorial link to home screen --- app/controllers/tables_controller.rb | 5 +++++ app/views/visitors/index.html.haml | 2 +- config/routes.rb | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/tables_controller.rb b/app/controllers/tables_controller.rb index f021ac9d..38d4552c 100644 --- a/app/controllers/tables_controller.rb +++ b/app/controllers/tables_controller.rb @@ -45,6 +45,11 @@ class TablesController < ApplicationController redirect_to @table end + def tutorial + flash[:notice] = "Tutorial coming soon!" + redirect_to root_path + end + # GET /tables/new def new @table = Table.new diff --git a/app/views/visitors/index.html.haml b/app/views/visitors/index.html.haml index a9f713ba..fa1352e4 100644 --- a/app/views/visitors/index.html.haml +++ b/app/views/visitors/index.html.haml @@ -4,4 +4,4 @@ #main-menu = link_to 'Play Now', play_now_path = link_to 'Browse Tables', tables_path - -# = link_to 'Tutorial', '#' + = link_to 'Tutorial', tutorial_path diff --git a/config/routes.rb b/config/routes.rb index 11e4a6f3..adb9ee58 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -41,6 +41,7 @@ Rails.application.routes.draw do root to: 'visitors#index' get '/play-now', to: 'tables#play_now', as: 'play_now' + get '/tutorial', to: 'tables#tutorial', as: 'tutorial' devise_for :users, controllers: { registrations: "users/registrations" } resources :users get '/loaderio-456644f4db1fcd1e8578be882d2fc476.txt', to: redirect('/assets/loaderio-456644f4db1fcd1e8578be882d2fc476.txt')