sample view for the project
This commit is contained in:
parent
df52b37acb
commit
a373af936b
|
@ -1,11 +1,15 @@
|
|||
class ProjectsController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
before_filter :find_platform
|
||||
before_filter :find_project, :only => [:show]
|
||||
|
||||
def new
|
||||
@project = @platform.projects.new
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
def create
|
||||
@project = @platform.projects.new params[:project]
|
||||
if @project.save
|
||||
|
@ -22,4 +26,8 @@ class ProjectsController < ApplicationController
|
|||
def find_platform
|
||||
@platform = Platform.find params[:platform_id]
|
||||
end
|
||||
|
||||
def find_project
|
||||
@project = @platform.projects.find params[:id]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
%h1= @project.name
|
||||
|
||||
= link_to "git-repo", platform_project_repo_path(@platform, @project)
|
|
@ -2,7 +2,9 @@ Rosa::Application.routes.draw do
|
|||
devise_for :users
|
||||
|
||||
resources :platforms do
|
||||
resources :projects
|
||||
resources :projects do
|
||||
resource :repo, :controller => "git/repositories", :only => [:show]
|
||||
end
|
||||
end
|
||||
|
||||
resources :users
|
||||
|
|
Loading…
Reference in New Issue