Rails 3 ajax call - ActionView::MissingTemplate
I am trying to make an ajax call but I don't want to return any data, or perhaps only return a 200.
My error is
ActionView::MissingTemplate (Missing template ....
My ajax method in the controller is...
# Ajax def updatePlayStat() #do something render :layout => false end
Is there a way to tell rails to return nothing, without creating an extra template file?
BTW i am making the ajax call by using jquery's $.post method in a js file.
You can render nothing with:
render :nothing => true
first of all, please use ruby style syntax and write your methods in snake_case!
if you just want to return a status 200, you can use the head method in your controller: http://apidock.com/rails/ActionController/Head/head