Wondering how to get started adding JavaScript to your Rails app? In this brief tutorial, we’ll look at how to add some effects with jQuery and send Ajax requests in a Rails 4 app!

If any of the Rails concepts in this tutorial threw you for a loop—such as forms, partials, redirects, or other Rails conventions—check out our Ruby on Rails: Level I online course. You can start this course for free today and begin learning how to design Rails apps with confidence.

If you need a bit of help understanding Ruby blocks such as those we used with the respond_to method, give our Mastering Ruby Blocks & Iterators online course a look-see. Blocks are used pervasively in well-designed Ruby and Rails apps, and this short course will help you become a blocks master.

Thanks for watching and please feel free to leave a comment below!

Source Code