O'Reilly logo

RailsSpace: Building a Social Networking Website with Ruby on Rails™ by Aurelius Prochazka, Michael Hartl

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Blog comments with Ajax

In this chapter, we extend the RailsSpace blog engine by allowing users to comment on blog posts. After all our hard work on RESTful blogs and posts in Chapter 15, comments by themselves are relatively straightforward, so we’ll keep things interesting by using Ajax to implement them. Since our comments are RESTful as well, we’ll have a chance to see how nicely REST and Ajax play together.

Although there are plenty of useful new techniques in this chapter, including several Rails Ajax helpers and the remarkable Ruby JavaScript (RJS), we should note that there is a layer of code that we will not explain. We will peek under the hood to see some of the code that produces the Ajax effects, but ultimately the actual ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required