this.render() using JSON?

55 views
Skip to first unread message

m...@raphieps.com

unread,
Oct 23, 2013, 11:43:35 AM10/23/13
to locomo...@googlegroups.com
Hey guys! To respond to API requests, I've been using this.res.json(someData);

However, I'd love to be able to use the "_ for private variables" convention. When I try this.render({format: "json"}), it looks for {controller}.json.ejs, which is obviously not the intended behavior.

My app is actually API-only, so if there was a way to set this behavior by default, that'd be great! If this isn't possible I can keep using this.res.json, but it'd be superb if it was!
Reply all
Reply to author
Forward
0 new messages