views episodes

#7
Mar 19

All About Layouts

Everything you wanted to know about layouts: global layouts, controller layouts, shared layouts, dynamic layouts and action layouts. Yes, there really are that many ways to specify a layout.
Tags: views
Download (20.1 MB, 6:54)
alternative download for iPod & Apple TV (10.8 MB, 6:54)
#8
Mar 21

Layouts and content_for

If you want to change something in the layout on a per-template basis, content_for is your answer! This allows templates to specify view code that can be placed anywhere in a layout.
Tags: views
Download (10.4 MB, 3:30)
alternative download for iPod & Apple TV (5.5 MB, 3:30)
#17
Apr 11

HABTM Checkboxes

It is often asked: how do I create a list of checkboxes for managing a HABTM association? Ask no more because this episode will show you how to do exactly that.
Tags: views forms
Download (30.6 MB, 6:54)
alternative download for iPod & Apple TV (13.8 MB, 6:54)
#18
Apr 13

Looping Through Flash

Displaying flash messages in the layout can be a pain at times. In this episode you will learn an easy way to display any kind of flash message by looping through the hash.
Tags: views
Download (6.3 MB, 1:44)
alternative download for iPod & Apple TV (2.7 MB, 1:44)
#27
May 04

Cross Site Scripting

Another common security issue is cross site scripting. In this episode you will see why it is so important to escape any HTML a user may submit.
Tags: security views
Download (19.4 MB, 5:50)
alternative download for iPod & Apple TV (9.3 MB, 5:50)
#28
May 07

in_groups_of

Have you ever wanted to visually line up items in rows and columns? The in_groups_of method makes this a cinch. Just watch out for the gotcha.
Download (15.3 MB, 4:25)
alternative download for iPod & Apple TV (7 MB, 4:25)
#29
May 09

group_by Month

Learn how to use the very useful group_by method to group an array by anything you want! In this episode I group an array of tasks by month then sort it properly.
Download (30.3 MB, 5:11)
alternative download for iPod & Apple TV (10.7 MB, 5:11)
#30
May 11

Pretty Page Title

If you are like me, you avoid creating page titles because it is kind of a pain. But in this episode I will show you a clean way to add titles to your pages.
Download (15.1 MB, 5:16)
alternative download for iPod & Apple TV (7.6 MB, 5:16)
#31
May 14

Formatting Time

Learn how to use the trusty strftime method to format a time, and see how Rails allows you to save this format for later use.
Download (17.9 MB, 5:01)
alternative download for iPod & Apple TV (7.3 MB, 5:01)
#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)
#37
May 28

Simple Search Form

A search form is quite different than other forms, this is because it does not deal with model's attributes. See a good way to add a simple search form in this episode.
Tags: views forms
Download (18.4 MB, 6:28)
alternative download for iPod & Apple TV (9.6 MB, 6:28)
#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)
#39
Jun 01

Customize Field Error

When a validation error occurs, Rails helpfully wraps the field in a div tag so you can style it. But sometimes you don't want this behavior. In this episode you will see how to customize it.
Tags: views
Download (18.1 MB, 3:30)
alternative download for iPod & Apple TV (7.7 MB, 3:30)
#40
Jun 04

Blocks in View

If you try to create a helper method which accepts a block, you will run into a few gotchas. Learn the secrets of blocks in views in this episode.
Tags: views
Download (20.1 MB, 9:06)
alternative download for iPod & Apple TV (11.8 MB, 9:06)
#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)
#55
Jul 09

Cleaning Up the View

This episode starts off with a big, messy template. Watch as this code shrinks and becomes more readable while the interface stays the same.
Download (27.2 MB, 9:26)
alternative download for iPod & Apple TV (14.8 MB, 9:26)
#57
Jul 13

Create Model Through Text Field

Let's say you provide a select menu for setting which category a given product belongs to, but you also want the option of creating a new category by typing the name in a text field. See a great way to do that in this episode.
Download (12.7 MB, 5:30)
alternative download for iPod & Apple TV (7.4 MB, 5:30)
#63
Jul 27

Model Name in URL

By default, Rails uses the model's id in the URL. What if you want to use the name of the model instead? You can change this behavior by overriding the to_param method in the model. Watch this episode for details.
Download (10.8 MB, 6:07)
alternative download for iPod & Apple TV (7.9 MB, 6:07)
#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)
#69
Sep 03

Markaby in Helper

Do you ever need to generate HTML code in a helper method? Placing it directly in Ruby strings is not very pretty. Learn a great way to generate HTML through Markaby in this episode.
Tags: views plugins
Download (8.5 MB, 6:29)
alternative download for iPod & Apple TV (8.1 MB, 6:29)
#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)
#74
Oct 08

Complex Forms Part 2

See how to use Javascript and RJS to add and remove form fields dynamically. This episode will build upon the previous episode allowing you to create any number of tasks in one form the same time a project is created.
Tags: forms ajax views
Download (13.7 MB, 8:54)
alternative download for iPod & Apple TV (11 MB, 8:54)
#75
Oct 15

Complex Forms Part 3

In this third and final episode on complex forms I will show you how to edit a project and multiple tasks all in one form. This includes removing and adding tasks dynamically as well. See the show notes for updated code.
Download (25.7 MB, 16:11)
alternative download for iPod & Apple TV (20.5 MB, 16:11)
#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)
#80
Nov 19

Simplify Views with Rails 2.0

Rails 2.0 is almost here. One of the many features in this release is the smarter helper methods which can make your views much cleaner. Learn all about it in this Episode.
Download (9.3 MB, 6:03)
alternative download for iPod & Apple TV (7.6 MB, 6:03)
#87
Jan 07

Generating RSS Feeds

See how to easily generate and link to an RSS feed using new features in Rails 2.0. Watch this episode or details.
Download (12.4 MB, 6:06)
alternative download for iPod & Apple TV (8.1 MB, 6:06)
#88
Jan 14

Dynamic Select Menus

See how to dynamically change a select menu based on another select menu using Javascript. In this episode everything is kept client side which leads to a more responsive user interface.
Tags: forms views ajax
Download (18.1 MB, 7:02)
alternative download for iPod & Apple TV (10.9 MB, 7:02)
#90
Jan 28

Fragment Caching

Sometimes you only want to cache a section of a page instead of the entire page. Fragment caching is the answer as shown in this episode.
Download (20.5 MB, 6:54)
alternative download for iPod & Apple TV (11.4 MB, 6:54)
#99
Mar 31

Complex Partials

How do you handle partials which have differences depending on the action which is rendering them? Here's three suggestions for this problem.
Download (14.7 MB, 8:56)
alternative download for iPod & Apple TV (11.5 MB, 8:56)
#100
Apr 07

5 View Tips

Here's five quick tips to use in views. Be sure to catch the end of the episode where I reveal an exciting contest!
Tags: views
Download (25.9 MB, 9:25)
alternative download for iPod & Apple TV (14.3 MB, 9:25)
#101
Apr 14

Refactoring Out Helper Object

If you have complex view logic, this can easily lead to helper methods which call each other. See how to refactor this out into another object in this episode.
Download (17.4 MB, 7:25)
alternative download for iPod & Apple TV (10.7 MB, 7:25)
#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