Reputation: 12593
I have a very simple task but got confused.
I need my action to respond with very simple JSON:
{"valid": true}
What do I need to write in my controller?
render :json => ......
Upvotes: 0
Views: 222
Reputation: 160311
render :json => { valid: true }
Rails should call to_json
automatically.
Upvotes: 2