summaryrefslogtreecommitdiffstats
path: root/app/controllers/committers_controller.rb
diff options
context:
space:
mode:
authorDavid A. Cuadrado <krawek@gmail.com>2008-04-04 16:53:54 -0500
committerDavid A. Cuadrado <krawek@gmail.com>2008-04-04 16:53:54 -0500
commit91b62bc75699f15f9ba5b0210ed7e7cff1969b95 (patch)
tree18e62ddfc51f3064a3b0252f3f3b0888226ae9fe /app/controllers/committers_controller.rb
parent708aef7b5f4b007a17b28d7753f9be588c665b4a (diff)
parent5b9a1d6781613e3420575b3440e7ffe92cbb5c8f (diff)
downloadgitorious-mainline-outdated-91b62bc75699f15f9ba5b0210ed7e7cff1969b95.zip
gitorious-mainline-outdated-91b62bc75699f15f9ba5b0210ed7e7cff1969b95.tar.gz
gitorious-mainline-outdated-91b62bc75699f15f9ba5b0210ed7e7cff1969b95.tar.bz2
Merge branch 'master' into events
Conflicts: app/controllers/merge_requests_controller.rb app/controllers/users_controller.rb
Diffstat (limited to 'app/controllers/committers_controller.rb')
-rw-r--r--app/controllers/committers_controller.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/app/controllers/committers_controller.rb b/app/controllers/committers_controller.rb
index 9f7f7ca..028e4c4 100644
--- a/app/controllers/committers_controller.rb
+++ b/app/controllers/committers_controller.rb
@@ -1,8 +1,8 @@
class CommittersController < ApplicationController
- before_filter :login_required, :only => [:new, :create, :destroy]
+ before_filter :login_required, :only => [:new, :create, :destroy, :list]
before_filter :find_project
before_filter :find_repository,
- :only => [:show, :new, :create, :edit, :update, :destroy]
+ :only => [:show, :new, :create, :edit, :update, :destroy, :list]
def new
@committer = User.new
@@ -24,8 +24,7 @@ class CommittersController < ApplicationController
Event.from_action_name("add committer", current_user, @repository, @committer.id)
format.html { redirect_to([@repository.project, @repository]) }
format.xml do
- render :nothing, :status => :created,
- :location => project_repository_path(@repository.project, @repository)
+ render :xml => @committer
end
else
flash[:error] = "Could not add user or user is already a committer"
@@ -54,6 +53,13 @@ class CommittersController < ApplicationController
end
end
+ def list
+ @committers = @repository.committers
+ respond_to do |format|
+ format.xml { render :xml => @committers }
+ end
+ end
+
def auto_complete_for_user_login
login = params[:user][:login]
@users = User.find(:all,