From d4ff2a867b84fc6185d37fd5a101e47a81a7f010 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Thu, 7 Aug 2014 10:17:33 -0300 Subject: [PATCH] Tutorial in the side bar --- app/views/layouts/application.html.erb | 2 ++ config/routes.rb | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 039169e..3e853eb 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -82,6 +82,8 @@
  • Hello, <%= current_user.name %>
  • <%= link_to 'My projects', user_projects_path(current_user.id) %>
  • <% end %> + +
  • <%= link_to 'Analysis', tutorials_path('analyzing') %>
  • <% if content_for?(:sidebar) %> <%= yield :sidebar %> <% else %> diff --git a/config/routes.rb b/config/routes.rb index 75f03ac..bef6f92 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Rails.application.routes.draw do - devise_for :users + devise_for :users get 'users/:user_id/projects' => 'users#projects', as: :user_projects resources :projects do @@ -32,9 +32,9 @@ Rails.application.routes.draw do #resources :modules post '/modules/:id/metric_history' => 'modules#metric_history' post '/modules/:id/tree' => 'modules#load_module_tree' - + # Tutorials - get '/tutorials/:name' => 'tutorials#view' + get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' root "home#index" -- libgit2 0.21.2