News for hackers. Stuff that matters.
Re:Nobody Understands REST or HTTP by awj on Sunday July 03, 2011 @10:27PM (#2725166)
I can see that point ... but where's the direction on what to do next? What's the post-scaffold JSON mechanism? Bonus points if it lets me generate/embed urls with the knowledge/techniques I have from making web pages.

If you say "erb", please don't be offended by me laughing.

Re:Nobody Understands REST or HTTP by rbxbx on Sunday July 03, 2011 @11:03PM (#2725226)
Perhaps something along the lines of the following would provide a good balance http://quickleft.com/blog/presenters-as-a-solution-to-asjson...

It's also worth noting that to_json should not be invoked directly these days in favor of as_json. It's now meant to more or less be an internal Rails API.

Re:Nobody Understands REST or HTTP by bphogan on Monday July 04, 2011 @03:09PM (#2727490)
Oh please ;) Don't hate on the ERb. It's fine for something like this.

OK, I am only half-kidding. Have you seen RABL? I've been meaning to play with this. http://blog.dcxn.com/2011/06/22/rails-json-templates-through...

Looks perfect.