Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Rails Companion
Let's Build a Web Application in Ruby (Without Rails!)
Introduction
Setup Project Directory
Install Puma Application Server
Install the Rack Gem
Create a Web Application
Run the Application
Reload App with Rack Reloader Middleware
What's Next?
Understanding Rack, both the Protocol and the Gem
Introduction
The Rack Protocol
The Rack Gem
Middleware Toolbox
Tools to Build Rack Apps + Middleware
The rackup Command
Convenient DSL
Conclusion
Build Your Own Router in Ruby
Introduction
What's a Router?
Current Setup
The Router Class
Using the Router
Step 1: Refactor the Router
Step 2: Create the Routes
Step 3: Update the App to Use New Routes
Pass HTTP Environment (Request) to Routes
Let's Implement the Controllers
Introduction
What We'll Build
Step 1: Create a Controller Class
Step 2: Update the Router
Step 3: Add the Route
Refactoring: Extract Constructor to Base Controller
Serving Static Files
Introduction
Separate View from Application
Make It Pretty with CSS
Serve Static Files via Middleware
How to Implement Rails-like Dynamic Views in Ruby
Introduction
Understanding the Concept of Binding in Ruby
Using ERB with Binding
Step 1: Add a Render Method on the Controller
Step 2: Render from Router
Wrap Up: Create a View Template
Implementing Logging
Introduction
Logging in Ruby
Logging to a Log File
Log Levels
Log File Rotation
Adding Logging to Our Ruby App
Introducing Models and Autoloading with Zeitwerk
Why Use Models?
Let's Add Models
Introduction to Zeitwerk
Using Zeitwerk to Load Constants
How Rails Configures Zeitwerk
Understanding Rails Middleware and Extracting Logging Middleware
Introduction
What is Middleware?
Why Use Middleware?
Let's Add Custom Middleware in Rails
Extract Logging Middleware
Teach online with
Step 3: Add the Route
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock