controllers episodes

#13
Apr 02

Dangers of Model in Session

Be careful when storing a model in a session. It will behave differently than you expect and can easily get out of sync with the database. Instead of storing the model directly in the session, store the id to the model and use that to fetch it from the database.
Tags: controllers
Download (12.4 MB, 5:17)
alternative download for iPod & Apple TV (7.2 MB, 5:17)
#34
May 21

Named Routes

When you add a custom route, make it a named route so you have url helper methods to easily link to that new route. See episode for details.
Download (30.9 MB, 6:39)
alternative download for iPod & Apple TV (9.8 MB, 6:39)
#35
May 23

Custom REST Actions

REST adds many constraints. It restricts your controllers to seven actions. Normally this is okay, but sometimes you need to add your own custom actions. Learn how in this episode.
Download (20.8 MB, 8:44)
alternative download for iPod & Apple TV (12.1 MB, 8:44)
#38
May 30

Multibutton Form

If you have a form with multiple buttons, you can detect which button was clicked by checking the passed parameters. Learn how in this episode.
Download (15.1 MB, 4:26)
alternative download for iPod & Apple TV (7.2 MB, 4:26)
#46
Jun 18

Catch-all Route

Sometimes you need to add complex/dynamic routes. This is often impossible to do in routes.rb, but do not worry. It can be accomplished with a catch-all route. See how in this episode.
Download (11.9 MB, 5:58)
alternative download for iPod & Apple TV (7.4 MB, 5:58)
#52
Jul 02

Update through Checkboxes

See how to select multiple items using checkboxes and perform an action on the selected items in this episode.
Download (27 MB, 10:02)
alternative download for iPod & Apple TV (14.6 MB, 10:02)
#53
Jul 04

Handling Exceptions

When an exception is raised in development you get the full error along with the stack trace. In production, only a simple message is displayed. Learn why this is and how to customize the handling of exceptions.
Tags: controllers
Download (29.3 MB, 8:32)
alternative download for iPod & Apple TV (14.1 MB, 8:32)
#64
Jul 30

Custom Helper Modules

Rails designates one helper module per controller, but that shouldn't stop you from making custom helper modules to help structure the code. Learn how in this episode.
Download (18.6 MB, 5:06)
alternative download for iPod & Apple TV (9 MB, 5:06)
#67
Aug 20

restful_authentication

Need multiple user authentication? If so, the restful_authentication plugin is a great way to go. It will generate some basic authentication code for you which is good starting point to your authentication system. Watch this episode for details.
Download (30.6 MB, 9:30)
alternative download for iPod & Apple TV (16.3 MB, 9:30)
#68
Aug 27

OpenID Authentication

Ever wonder how to implement OpenID authentication in your Rails app? This episode will show you how to add it to a site with an existing authentication system.
Download (27.7 MB, 11:09)
alternative download for iPod & Apple TV (16.4 MB, 11:09)
#70
Sep 10

Custom Routes

In this episode you will learn how to add custom routes, make some parameters optional, and add requirements for other parameters.
Download (10.6 MB, 7:05)
alternative download for iPod & Apple TV (8.5 MB, 7:05)
#71
Sep 17

Testing Controllers with RSpec

Controllers are tricky to test, and there's no perfect way to do it. In this episode you will see how I test controllers, and my reasoning behind it.
Download (17.6 MB, 11:17)
alternative download for iPod & Apple TV (14.6 MB, 11:17)
#73
Oct 01

Complex Forms Part 1

Complex forms often lead to complex controllers, but that doesn't have to be the case. In this episode see how you can create multiple models through a single form while keeping the controller clean.
Download (13.5 MB, 8:05)
alternative download for iPod & Apple TV (10.1 MB, 8:05)
#77
Oct 29

Destroy Without JavaScript

If the user has JavaScript disabled, the "Destroy" link might not work properly. In this episode I will explore a number of ways to work around this issue.
Download (14.3 MB, 7:08)
alternative download for iPod & Apple TV (9.6 MB, 7:08)
#78
Nov 05

Generating PDF Documents

In this episode I will show you how to create PDF documents using the excellent PDF::Writer gem.
Download (17.2 MB, 7:13)
alternative download for iPod & Apple TV (10.4 MB, 7:13)
#82
Dec 03

HTTP Basic Authentication

Rails 2.0 offers an extremely easy way to do HTTP basic authentication. See how in this episode.
Download (11.6 MB, 4:23)
alternative download for iPod & Apple TV (6.6 MB, 4:23)
#89
Jan 21

Page Caching

Page caching is an efficient way to cache stateless content. In this episode I will show you how to cache the dynamic javascript we created last week.
Download (21.9 MB, 6:31)
alternative download for iPod & Apple TV (11.7 MB, 6:31)
#93
Feb 18

Action Caching

Action caching behaves much like page caching except it processes the controller filters. You can also make it conditional as seen in this episode.
Download (19.8 MB, 7:04)
alternative download for iPod & Apple TV (11.2 MB, 7:04)
#103
Apr 28

Site Wide Announcements

Sometimes you need to display an administrative announcement to every page on the site and give the users the ability to hide the announcement. See how in this episode.
Download (21.5 MB, 13:30)
alternative download for iPod & Apple TV (16.2 MB, 13:30)
subscribe:
sponsored by:
if you want to help:
required:
Get Quicktime Player