Trying to add repositories to my hierarchy (step 2)

This commit is contained in:
Alexey Nayden 2011-03-11 19:13:24 +03:00
parent 80304ef7f2
commit 40b28e4a84
5 changed files with 12 additions and 9 deletions

View File

@ -7,10 +7,11 @@
= @platform.path = @platform.path
%h2= t('layout.platforms.projects') %h2= t('layout.platforms.repositories')
- @projects.each do |project| - @repositories.each do |repository|
= div_for project do = div_for repository do
= link_to project.name, [@platform, project] = link_to repository.name, [@platform, repository]
= link_to t('layout.projects.new'), new_platform_project_path(@platform) = link_to t('layout.repositories.new'), new_platform_repository_path(@platform)
%h2= t('layout.platforms.products') %h2= t('layout.platforms.products')
TBD

View File

@ -7,6 +7,6 @@
= t('layout.projects.git_repo_location') = t('layout.projects.git_repo_location')
= @project.git_repo_path = @project.git_repo_path
= link_to t('layout.projects.back_to_the_list'), platform_path(@platform) = link_to t('layout.projects.back_to_the_list'), platform_repository_path(@repository, @platform)
%br/ %br/
= link_to "git-repo", platform_project_repo_path(@platform, @project) = link_to "git-repo", platform_repository_project_repo_path(@platform, @repository, @project)

View File

View File

View File

@ -2,10 +2,12 @@ Rosa::Application.routes.draw do
devise_for :users devise_for :users
resources :platforms do resources :platforms do
resources :repositories do
resources :projects do resources :projects do
resource :repo, :controller => "git/repositories", :only => [:show] resource :repo, :controller => "git/repositories", :only => [:show]
end end
end end
end
resources :users resources :users