Commit a47cdeaf287d5a420bf694ae5a2fb6c598380222
1 parent
e61086ad
Exists in
colab
and in
4 other branches
Repository edition fixed
Showing
3 changed files
with
4 additions
and
4 deletions
Show diff stats
app/views/repositories/edit.html.erb
| @@ -4,4 +4,4 @@ | @@ -4,4 +4,4 @@ | ||
| 4 | <% end %> | 4 | <% end %> |
| 5 | 5 | ||
| 6 | <%= link_to 'Show', project_repository_path(@project_id, @repository) %> | | 6 | <%= link_to 'Show', project_repository_path(@project_id, @repository) %> | |
| 7 | -<%= link_to 'Back', project_repository(@project_id) %> | 7 | +<%= link_to 'Back', project_repositories_path(@project_id) %> |
app/views/repositories/show.html.erb
| @@ -5,5 +5,5 @@ | @@ -5,5 +5,5 @@ | ||
| 5 | <%= @repository.name %> | 5 | <%= @repository.name %> |
| 6 | </p> | 6 | </p> |
| 7 | 7 | ||
| 8 | -<%= link_to 'Edit', edit_project_repository_path(@repository) %> | | ||
| 9 | -<%= link_to 'Back', project_repositories_path(@project_id) %> | 8 | +<%= link_to 'Edit', edit_project_repository_path(@repository.project_id, @repository.id) %> | |
| 9 | +<%= link_to 'Back', project_path(@project_id) %> |
config/routes.rb
| @@ -7,7 +7,7 @@ Mezuro::Application.routes.draw do | @@ -7,7 +7,7 @@ Mezuro::Application.routes.draw do | ||
| 7 | #resources :projects | 7 | #resources :projects |
| 8 | 8 | ||
| 9 | resources :projects do | 9 | resources :projects do |
| 10 | - resources :repositories, except: :update | 10 | + resources :repositories, except: [:update, :index] |
| 11 | put '/repositories/:id' => 'repositories#update', as: :repository_update | 11 | put '/repositories/:id' => 'repositories#update', as: :repository_update |
| 12 | end | 12 | end |
| 13 | # The priority is based upon order of creation: first created -> highest priority. | 13 | # The priority is based upon order of creation: first created -> highest priority. |