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
See: http://guides.rubyonrails.org/layouts_and_rendering.html#using-render
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With