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)
Token Fields (revised)
The Chosen plugin makes it easy to turn a many-to-many select menu into a searchable token field. Then see how the jQuery Tokeninput field can help with AJAX loading and creating new records.
(10 minutes)
Devise and OmniAuth (revised)
In this episode I build upon a standard Devise setup and show how to add 3rd party authentication using OmniAuth. This includes support for user validations and is compatible with normal password authentication.
(10 minutes)
Passing Data to JavaScript
There are a variety of ways to pass variables from a Rails application to JavaScript. Here I show three techniques: a script tag, a data attribute, and the Gon gem.
(6 minutes)
Upgrading to Rails 3 Part 3
Here we finish up this upgrade series by removing all deprecation warnings and fixing some problems in the view.
(9 minutes)
PDFs with Prawn (revised)
Prawn is an excellent Ruby library for generating PDF documents. Here you will learn how to add it to a Rails application through a separate PDF renderer class.
(11 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)
Mongoid (revised)
Mongoid is a Ruby gem for interacting with MongoDB. Here I show the basics of setting up an app, querying for records, adding embedded associations, overriding the id, and more.
(9 minutes)
MiniProfiler
MiniProfiler allows you to see the speed of a request conveniently on the page. It also shows the SQL queries performed and allows you to profile a specific block of code.
(9 minutes)