Abstract
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 of your scripts and styles. It handles combining and minifying files to support quick download times and provides support for languages that compile down to JavaScript (CoffeeScript) and CSS (SASS).
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Adam Gamble
About this chapter
Cite this chapter
Gamble, A., Carneiro, C., Barazi, R.A. (2013). JavaScript and CSS. In: Beginning Rails 4. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6035-6_9
Download citation
DOI: https://doi.org/10.1007/978-1-4302-6035-6_9
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-6034-9
Online ISBN: 978-1-4302-6035-6
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books