RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: Views x
Formatting Time
Episode #31May 14, 200746 comments

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. (5 minutes)
Pretty Page Title
Episode #30May 11, 200766 comments

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. (5 minutes)
group_by Month
Episode #29May 09, 200762 comments

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. (5 minutes)
in_groups_of
Episode #28May 07, 200743 comments

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. (4 minutes)
Cross Site Scripting
Episode #27May 04, 200739 comments

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. (5 minutes)
Looping Through Flash
Episode #18Apr 13, 200735 comments

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. (1 minute)
HABTM Checkboxes
Episode #17Apr 11, 2007115 comments

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. (6 minutes)
Layouts and content_for
Episode #8Mar 21, 200745 comments

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. (3 minutes)
All About Layouts
Episode #7Mar 19, 200739 comments

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. (6 minutes)