Learn how to use asset pipeline to add stylesheets to a Ruby on Rails application. Write the CSS for the stylesheet, list the stylesheet in the manifest, add the manifest to the asset precompile list, and include a stylesheet link tag in the HTML.
- [Teacher] In this movie, we'll learn how to use…Asset Pipeline to add stylesheets to our Rails project.…There are several steps to adding…stylesheets to your project.…The first is of course we need to write the stylesheets.…Once we've done that, we need to add the stylesheet…to the manifest file, and add the manifest file…to Rail's asset precompile list.…That will ensure that Asset Pipeline is able to put together…a stylesheet that's ready for serving to the browser.…Then we just need to go into our HTML and add…a stylesheet link tag so that our page will know that that's…the stylesheet that should be served up with the page.…
Let's walk through each one of these.…To write our stylesheets, if we're using Asset Pipeline,…which you should be, stylesheets should be kept…in /app/assets/stylesheets.…If for some reason you weren't using Asset Pipeline…and you wanted to serve up static stylesheets instead,…then you would put them in /public/stylesheets.…Stylesheets should end their file names…with .scss, but if we're using Sass,…
- Creating and configuring a new Ruby on Rails project
- Generating controllers and views
- Handling server requests
- Using different types of routes
- Rendering and viewing templates
- Generating migrations and models
- Creating, updating, and deleting records
- Finding records with queries
- Understanding relationship types
- Writing controllers for CRUD
- Working with layouts and helpers
- Managing application assets
- Building forms
- Validating data
- Authenticating users
Skill Level Beginner
1. What Is Ruby on Rails?
2. Get Started
3. Controllers, Views, and Dynamic Content
4. Databases and Migrations
5. Models and ActiveRecord
7. CRUD, REST, and Resourceful Routes
8. Controllers and CRUD
9. Layouts, Partials, and View Helpers
12. Data Validation
13. Controller Features
14. User Authentication
15. Improve the Simple CMS
Next steps1m 44s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.