Commit d4ff2a867b84fc6185d37fd5a101e47a81a7f010
1 parent
892d40c6
Exists in
colab
and in
4 other branches
Tutorial in the side bar
Showing
2 changed files
with
5 additions
and
3 deletions
Show diff stats
app/views/layouts/application.html.erb
| ... | ... | @@ -82,6 +82,8 @@ |
| 82 | 82 | <li>Hello, <strong><%= current_user.name %></strong></li> |
| 83 | 83 | <li><%= link_to 'My projects', user_projects_path(current_user.id) %></li> |
| 84 | 84 | <% end %> |
| 85 | + <li class="nav-header">Tutorials</li> | |
| 86 | + <li><%= link_to 'Analysis', tutorials_path('analyzing') %></li> | |
| 85 | 87 | <% if content_for?(:sidebar) %> |
| 86 | 88 | <%= yield :sidebar %> |
| 87 | 89 | <% else %> | ... | ... |
config/routes.rb
| 1 | 1 | Rails.application.routes.draw do |
| 2 | - devise_for :users | |
| 2 | + devise_for :users | |
| 3 | 3 | get 'users/:user_id/projects' => 'users#projects', as: :user_projects |
| 4 | 4 | |
| 5 | 5 | resources :projects do |
| ... | ... | @@ -32,9 +32,9 @@ Rails.application.routes.draw do |
| 32 | 32 | #resources :modules |
| 33 | 33 | post '/modules/:id/metric_history' => 'modules#metric_history' |
| 34 | 34 | post '/modules/:id/tree' => 'modules#load_module_tree' |
| 35 | - | |
| 35 | + | |
| 36 | 36 | # Tutorials |
| 37 | - get '/tutorials/:name' => 'tutorials#view' | |
| 37 | + get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' | |
| 38 | 38 | |
| 39 | 39 | root "home#index" |
| 40 | 40 | ... | ... |