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
Destroy without JavaScript (revised)
A destroy link in Rails does not work without JavaScript. In this episode I show two techniques for gracefully degrading destroy links: button_to and a delete action.
(8 minutes)
Syntax Highlighting (revised)
Here I compare several syntax highlighting solutions and show how to use Pygments in a Rails app. I also show how to integrate it with Markdown and add caching.
(8 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)
Rails 2.2 Extras
This episode finishes up the Rails 2.2 series by showing a few miscellaneous additions that I find useful.
(4 minutes)
Charts & Graphs (revised)
If you have a lot of data, consider adding a graph to provide an overview of it. Here I show how to use Morris.js to chart an Order model and visualize trends in the data.
(12 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)
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)
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)
Template Handlers
Here I will demonstrate creating two template handlers. One for Ruby which is great for JSON or CSV formats. Another for interpreting Markdown which is useful for informational content.
(12 minutes)