active-support episodes
#6
Mar 16
5 comments
Shortcut Blocks with Symbol to_proc
It may have a goofy syntax, but the Symbol#to_proc feature Rails adds allows you to do simple blocks very quickly and easily.
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.
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.
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.
with_options
Several methods in rails take a hash of options as the last argument. If you are passing the same options to several methods, you can remove this duplication by using with_options. Learn all about it in this episode.



