diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-03 11:45:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-03 11:45:55 +0000 |
commit | ea59d93dc82d9675586c4b2e176fb4b7640e3158 (patch) | |
tree | 3980135b53b29eb8e266a7a3e484c4bfdc57ad37 /app/controllers | |
parent | e9775097ec5da895cece3085915865faa4a51710 (diff) | |
download | redmine-ea59d93dc82d9675586c4b2e176fb4b7640e3158.tar.gz redmine-ea59d93dc82d9675586c4b2e176fb4b7640e3158.zip |
Dry Users API responders.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4454 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/users_controller.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index ff118e744..fef13c7d2 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -49,8 +49,7 @@ class UsersController < ApplicationController respond_to do |format| format.html { render :layout => !request.xhr? } - format.json { render :template => 'users/index.apit' } - format.xml { render :template => 'users/index.apit' } + format.api { render :template => 'users/index.apit' } end end @@ -72,8 +71,7 @@ class UsersController < ApplicationController respond_to do |format| format.html { render :layout => 'base' } - format.json { render :template => 'users/show.apit' } - format.xml { render :template => 'users/show.apit' } + format.api { render :template => 'users/show.apit' } end rescue ActiveRecord::RecordNotFound render_404 @@ -116,8 +114,7 @@ class UsersController < ApplicationController {:controller => 'users', :action => 'edit', :id => @user} ) } - format.json { render :template => 'users/show.apit', :status => :created, :location => user_url(@user) } - format.xml { render :template => 'users/show.apit', :status => :created, :location => user_url(@user) } + format.api { render :template => 'users/show.apit', :status => :created, :location => user_url(@user) } end else @auth_sources = AuthSource.find(:all) @@ -175,8 +172,7 @@ class UsersController < ApplicationController flash[:notice] = l(:notice_successful_update) redirect_to :back } - format.json { head :ok } - format.xml { head :ok } + format.api { head :ok } end else @auth_sources = AuthSource.find(:all) |