YouTube home Comedy Week on YouTube
Upload

Dealing with Nil

schneems schneems·73 videos
1,163
356 views
Like     Dislike 0

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like schneems's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike schneems's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add schneems's video to your playlist.

Published on Aug 2, 2012

As a Ruby programmer the most common value you'll encounter will be `nil`. It's our duty to be on constant watch for `nil` and make sure it doesn't reek havoc on our code. This video will introduce you to some boolean logic we can use to defend against the tyranny of nil. We'll then cover using `nil?` and `empty?` as well as several custom Active Support methods we can use from Rails to help guard against nil. Nil isn't all bad, at the end we'll see how we can use this functionality of nil to populate variables only if they don't exist. We'll use this to find or create a user in Rails.

http://schneems.com/ut-rails

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

The interactive transcript could not be loaded.

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

All Comments (0)

Sign in now to post a comment!
  • Loading comment...
Loading...
Loading...
Working...
Sign in to add this to Watch Later