CHAPTER 9

image

JavaScript and CSS

JavaScript and CSS (Cascading Style Sheets) are no longer relegated to supporting roles on the Web. They have become first-class citizens, and it would seem pretty strange to build a web application without them. It’s now common to have hundreds or thousands of lines of JavaScript, and just as many lines of style sheets. Rails applications have always supported serving JavaScript and CSS, but it became clear that a better solution was needed. In Rails 3.1, the asset pipeline was introduced. This made JavaScript and CSS a first-class citizen of the Rails application and allowed for proper organization and handling ...

Get Beginning Rails 4, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.