KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When a user POSTs JSON to the /update/ action in a Rails 3 app, what is the best way to respond? I want to just send an empty JSON response with a 200 code, something like head :no_content or render :nothing => true, :status => 204 (examples from How to return HTTP 204 in a Rails controller ). Typically I have been doing this: render :json => {} or render :json => 'ok' Is there preferred or more Rails-y way to this?
Tags (comma-separated)
Save Edits
Cancel