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
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)
In-Place Editing
Edit an attribute in-place without leaving a page using the Best In Place gem. Learn how to add validations and support for various field types.
(8 minutes)
Mercury Editor
Mercury allows you to edit a section of HTML directly in the web browser through a WYSIWYG editor. Here I show how to integrate Mercury into a Rails app and save the changes back to the database.
(11 minutes)
Draper
Clean up complex view logic using Draper. This gem provides decorators (much like presenters) which bundles view logic in an object oriented fashion. In this episode I do a step-by-step refactoring of a complex template into a decorator.
(12 minutes)
Markdown with Redcarpet
Redcarpet is an easy-to-use gem which interprets Markdown. Here I show how to customize it and add syntax highlighting through Pygments and Albino.
(6 minutes)
Template Inheritance
In Rails 3.1 the controller inheritance also applies to the view layer. Here I show how to add an application template which is shared by all views, and a lookup path for overriding templates based on the subdomain.
(8 minutes)
HTTP Streaming
HTTP Streaming allows the browser to start processing the HTML response while the Rails app is still processing the rest of the request.
(9 minutes)
Decent Exposure
The decent_exposure gem makes it convenient to share controller data with the view through methods instead of instance variables.
(9 minutes)
I18n Backends
Internationalization is easy to add in Rails, but the YAML files can be difficult to manage. In this episode I show how to use Redis for managing the translations through a web interface.
(11 minutes)
Sortable Table Columns
Here I walk you through adding the ability to sort table columns in ascending or descending order by clicking the header.
(10 minutes)