Convert render :text to render :body

Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
Matt Rogers 2018-09-22 13:03:35 -05:00
parent 60ae4f6f5f
commit 5805c511bb
No known key found for this signature in database
GPG key ID: 605D017C07EB4316
9 changed files with 20 additions and 20 deletions

View file

@ -61,7 +61,7 @@ class ContextsController < ApplicationController
end
else
respond_to do |format|
format.html { render :text => 'Context not found', :status => 404 }
format.html { render :body => 'Context not found', :status => 404 }
format.xml { render :xml => '<error>Context not found</error>', :status => 404 }
end
end
@ -116,7 +116,7 @@ class ContextsController < ApplicationController
if @saved
render :xml => @context.to_xml( :except => :user_id )
else
render :text => "Error on update: #{@context.errors.full_messages.inject("") {|v, e| v + e + " " }}", :status => 409
render :body => "Error on update: #{@context.errors.full_messages.inject("") {|v, e| v + e + " " }}", :status => 409
end
}
end
@ -142,7 +142,7 @@ class ContextsController < ApplicationController
@down_count = current_user.contexts.size
update_state_counts
end
format.xml { render :text => "Deleted context #{@context.name}" }
format.xml { render :body => "Deleted context #{@context.name}" }
end
end
@ -222,7 +222,7 @@ class ContextsController < ApplicationController
def render_autocomplete
lambda do
render :text => for_autocomplete(current_user.contexts, params[:term])
render :body => for_autocomplete(current_user.contexts, params[:term])
end
end