summaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorJohan Sørensen <johan@johansorensen.com>2009-02-19 11:21:51 +0100
committerJohan Sørensen <johan@johansorensen.com>2009-04-22 15:14:30 +0200
commit6a4e16ddabb2427fad84f4951015548bbad780b0 (patch)
tree83b3e4aa36ad7c4dc33cc3764a7d808c57c6cb2f /app/controllers/application_controller.rb
parentf2c657e142412117d653a209306df77a46253555 (diff)
downloadgitorious-mainline-outdated-6a4e16ddabb2427fad84f4951015548bbad780b0.zip
gitorious-mainline-outdated-6a4e16ddabb2427fad84f4951015548bbad780b0.tar.gz
gitorious-mainline-outdated-6a4e16ddabb2427fad84f4951015548bbad780b0.tar.bz2
Separate out the repository ownership from the namespacing
This allows us to keep them seperated, as well as greatly simplify the owner vs their repositories relationship (through named_scope) - Remove the database entry for repositories.mainline - introduce tree levels specifically for namespace: KIND_{PROJECT,USER,TEAM}_REPO - Migration to update existing repositories - Project#repositories includes all the reposes in the project scope, use the named scopes on Repository to filter by mainlines/clones/users/groups - Get rid of Project#project_repositories in favor of the above - Got rid of the ugly all_by_owner named_scope in favor of the above - Made sure the correct kind is set in repositories#create
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 9cd4dfe..6f8fd40 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -64,6 +64,7 @@ class ApplicationController < ActionController::Base
def find_repository_owner
if params[:project_id]
@owner = Project.find_by_slug!(params[:project_id])
+ @project = @owner
elsif params[:user_id]
@owner = User.find_by_login!(params[:user_id])
elsif params[:group_id]
@@ -71,9 +72,6 @@ class ApplicationController < ActionController::Base
else
raise ActiveRecord::RecordNotFound
end
- if @owner.is_a?(Project)
- @project = @owner
- end
end
def find_repository_owner_and_repository