Here\'s a beginner rails question...
After I do:
format.xml { head: ok}
How do I return from the controller endpoint without showing th
I guess you must be asking for :
render :nothing => true
You can use "render :nothing => true, :status => :ok
" to return without rendering anything, once you have send a render :nothing => true you need to return from the controller, something like this might work. You can swap the head()
method call for a render => :nothing
followed by a return
, the head()
method is documented here:
Here's the code that should do it for you...
Ping me if that doesn't properly answer your question, documentation for the render call with some helpful user comments can be found here:
(sorry I couldn't hyperlink the links for you, as a new user stackoverflow won't allow me to post more than one!)
Use
render :nothing => true, :status => :ok
in your action method