From 726526eabf7e4ebf45d26183013702421f1cd841 Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Thu, 25 Apr 2013 02:11:11 -0400 Subject: [PATCH] added a sidebar element, an index to let ppl know how to get started, and some logic to get users to the tutorials and back into the app regardless of auth or not --- app/controllers/tutorials_controller.rb | 7 +++++ app/views/layouts/shared/_header.html.erb | 27 +++----------------- app/views/layouts/tutorial/_header.html.erb | 6 ++++- app/views/layouts/tutorial/_sidebar.html.erb | 8 ++++++ app/views/tutorials/index.html.erb | 7 +++++ 5 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 app/views/tutorials/index.html.erb diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index 1e77beb..7854812 100755 --- a/app/controllers/tutorials_controller.rb +++ b/app/controllers/tutorials_controller.rb @@ -2,6 +2,13 @@ class TutorialsController < ApplicationController skip_before_filter :authenticated + def index + end + + def show + render "injection" + end + def injection end diff --git a/app/views/layouts/shared/_header.html.erb b/app/views/layouts/shared/_header.html.erb index 5260491..38e4b73 100755 --- a/app/views/layouts/shared/_header.html.erb +++ b/app/views/layouts/shared/_header.html.erb @@ -29,29 +29,8 @@ --> Welcome, <%= current_user.first_name.html_safe %> -
  • - - - - 3 - - -
  • -
  • - - - - 5 - - -
  • -
  • - - - - 9 - - -
  • +
  • + <%= button_to "RailsGoat Tutorials", tutorials_path, {:class => "btn btn-primary", :method => "get"}%> +
  • \ No newline at end of file diff --git a/app/views/layouts/tutorial/_header.html.erb b/app/views/layouts/tutorial/_header.html.erb index 76f59ce..5b96e27 100755 --- a/app/views/layouts/tutorial/_header.html.erb +++ b/app/views/layouts/tutorial/_header.html.erb @@ -13,7 +13,11 @@ <% else %> - + <% end %> \ No newline at end of file diff --git a/app/views/layouts/tutorial/_sidebar.html.erb b/app/views/layouts/tutorial/_sidebar.html.erb index ac7d09f..6b1f9f9 100755 --- a/app/views/layouts/tutorial/_sidebar.html.erb +++ b/app/views/layouts/tutorial/_sidebar.html.erb @@ -1,5 +1,13 @@