mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-02 07:18:49 +01:00
Convert render :text to render :body
Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
parent
60ae4f6f5f
commit
5805c511bb
9 changed files with 20 additions and 20 deletions
|
|
@ -99,7 +99,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
format.xml do
|
||||
unless current_user && current_user.is_admin
|
||||
render :text => "401 Unauthorized: Only admin users are allowed access to this function.", :status => 401
|
||||
render :body => "401 Unauthorized: Only admin users are allowed access to this function.", :status => 401
|
||||
return
|
||||
end
|
||||
unless check_create_user_params
|
||||
|
|
@ -110,7 +110,7 @@ class UsersController < ApplicationController
|
|||
user.password_confirmation = user_params[:password]
|
||||
saved = user.save
|
||||
unless user.new_record?
|
||||
render :text => t('users.user_created'), :status => 200
|
||||
render :body => t('users.user_created'), :status => 200
|
||||
else
|
||||
render_failure user.errors.to_xml, 409
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue