Types
- Free Episodes
- Pro Episodes
- Revised Episodes
Categories
- Active Record
- Active Resource
- Active Support
- Administration
- Ajax
- APIs
- Authentication
- Authorization
- Background Jobs
- Caching
- Code Walkthrough
- Controllers
- Debugging
- Deployment
- eCommerce
- Forms
- Mailing
- Models
- Performance
- Plugins
- Production
- Rack
- Rails 2.0
- Rails 2.1
- Rails 2.2
- Rails 2.3
- Rails 3.0
- Rails 3.1
- Rails 3.2
- Rails 4.0
- Refactoring
- Routing
- Search
- Security
- Testing
- Tools
- Views
Extracting a Ruby Gem
In this episode I show how to extract a Ruby Gem from an existing Rails application, test it with RSpec and Supermodel, and add a Railtie.
(16 minutes)
Activity Feed from Scratch
Creating an activity feed presents some interesting challenges. Here I share my thought process behind my implementation including when to use callbacks and a few tricks with partials.
(14 minutes)
Service Objects
Models can quickly become a grab-bag of unrelated methods if behavior is constantly being pushed from the controller. Here I show how to refactor this using Concerns and Service Objects.
(12 minutes)
Authentication with Warden
Warden makes it easy to move authentication up into Rack middleware. This means authentication can be accessed outside of a Rails controller such as in routes or in a mountable engine.
(12 minutes)
Autocomplete Search Terms
Learn how to add autocompletion to a search form and improve performance using Rack middleware, caching and switching from SQL to Redis.
(17 minutes)
Receiving Email with Mailman
The Mailman gem makes it easy to receive email in a Rails application. Here I show how to write a script to run Mailman in its own process and pull down mail from a POP3 account.
(11 minutes)
STI and Polymorphic Associations
Single Table Inheritance (STI) can help organize branching logic into separate classes, but a polymorphic association may be a better fit if there are unique database columns.
(14 minutes)
A Tour of State Machines
Here I show how three popular state machine gems can be used to clean up a list of boolean/datetime fields. I also show a custom solution which keeps track of the history of events.
(12 minutes)
Full-Text Search in PostgreSQL
Postgres offers full-text searching right out of the box. This episode shows how to write queries from scratch, apply tools like Texticle and pg_search, and optimize performance through indexes.
(16 minutes)
Testing JavaScript with PhantomJS
PhantomJS allows us to test JavaScript without going through a browser window. Here I show how to do this using Capybara and Poltergeist. I also give some tips on handling database transactions and skipping javascript tests.
(10 minutes)