the second classic oops commit

This commit is contained in:
Timothy N. Tsvetkov 2011-03-10 17:22:53 +03:00
parent a373af936b
commit da7d23abd0
2 changed files with 10 additions and 6 deletions

View File

@ -1,7 +1,7 @@
class Git::BaseController < ApplicationController class Git::BaseController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :find_platfrom before_filter :find_platform
before_filter :find_project before_filter :find_project
before_filter :find_repository before_filter :find_repository
@ -11,7 +11,7 @@ class Git::BaseController < ApplicationController
end end
def find_project def find_project
@project = Project.find_by_name!(params[:project_name]) @project = @platform.projects.find_by_name!(params[:project_name])
end end
def find_repository def find_repository

View File

@ -5,9 +5,13 @@ class Git::RepositoriesController < Git::BaseController
@tree = @commit.tree @tree = @commit.tree
end end
# def commits protected
# branch_name = (params[:branch] ? params[:branch] : "master") def find_platform
# @commits = @repository.commits(branch_name) @platform = Platform.find params[:platform_id]
# end end
def find_project
@project = Project.find params[:project_id]
end
end end