Ruby on Rails Controllers and Views
1h 29mIntermediate2022-07-15
Authors

Kevin Skoglund
Founder of NovaFabrica
Course details
Want to build smarter controllers and better-looking web pages with Ruby on Rails? In this foundational course, instructor Kevin Skoglund teaches developers how to better implement controllers and views in Ruby on Rails, and covers the fundamentals and best practices around these common programming concepts. Learn how to leverage the most useful features of controllers, including maintaining state with cookie and session data, displaying messages, organizing code, and using filters for routine tasks. Next, discover how to render different types of data, how to use view layouts, and how to incorporate assets such as images, style sheets, and JavaScript. Finally, find out how to work more efficiently with Ruby helper methods, which make common tasks like formatting text and numbers, date and time calculations, and outputting form fields easier.
Skills covered
Ruby on RailsBack-End Web DevelopmentFull-Stack Web DevelopmentWeb DevelopmentOpen SourceDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Smarter controllers and better-looking webpages
- 02 - What you should know
- 03 - Use the exercise files GitHub repository
1. Useful Controller Features
- 04 - Store data in cookies
- 05 - Store data in sessions
- 06 - Messaging with the flash hash
- 07 - Log information to a file
- 08 - Inherit common behaviors with ApplicationController
- 09 - Use filters to call methods automatically
2. Rendering Views
- 10 - Avoid double render errors
- 11 - More options for rendering content
- 12 - Use layouts for shared templates
- 13 - Capture content for later use
3. Incorporating Assets
- 14 - Add stylesheets to view templates
- 15 - Use static image assets
- 16 - Use images as CSS backgrounds
4. Work Faster with Helpers
- 17 - Text helpers
- 18 - Sanitization helpers
- 19 - Number helpers
- 20 - Date and time helpers
- 21 - Form helpers
- 22 - Custom helpers
Conclusion
- 23 - Next steps
Related courses
Related learn paths
- Build Your Ruby on Rails Skills
- Getting Started with R for Data Science
- Getting Started with Continuous Integration / Continuous Delivery (CI/CD)
- Getting Started with DevOps
- Prepare for the CompTIA PenTest+ (PT0-002) Certification Exam
- Become a Programmer: Foundations
- Getting Started with C++
- Prepare for the CompTIA PenTest+ (PT0-001) Exam