GoRails Screencasts
Loops & Blocks in Ruby

Loops & Blocks in Ruby

GoRails Screencasts

47:20

About this episode

Loops allow you to run code multiple times. This is handy when you need to process a group of items one at a time until the entire group is finished. We'll also learn about Ruby blocks to define the set of operations.

More from GoRails Screencasts

Configuring servers can be tricky, but it's much easier using drop-in configs so you're not editing files that could change across versions or environments.

7m

The Whenever gem is fantastic for defining cron jobs. With a little customization, we can have it monitor cron jobs and report logs, and status to services like AppSignal.

12m

Learn how to use Rails' with_options to DRY up duplicated options across method calls and associations, including how to nest them for shared defaults.

8m