Active Record class-level scopes methods are reusable custom queries that live inside your models. They are chain-able and give you ActiveRecord::Relation objects.

Redundantly, scope methods utilize the scope method which takes in two arguments: 1) the name you will use to call it and 2) a lambda, shown here as an active record query:

Side quest: What is a lambda? A lambda is a way of defining a block and parameters. Here are two very simple versions, one with an argument and one without:

sweet_lambda -> {puts "Peep this sweet Lambda"}times_three -> (x) { x * 3}

Now back…


I used to skate by with a surface level understanding of Ruby boolean logic, occasionally confounded by what I thought “should” be happening. But I know now that I was missing something important. And that something was the order of operations.

A little context: my nyc apartment building has a bike room and lost all record of spot ownership. It’s been a wild west ever since. I set out to create a site for building management using Ruby to track who has which spot, who owns which bikes, and to identify which bikes ought not to be in which spots…


For my first Flatiron Project I recalled a dilemma from my pre-COVID days: My friends and I (poor musicians) were always on the hunt for cheap drinks in various neighborhoods after side-hustles and before shows—but how to find a good Happy Hour? Bars often don’t advertise them on their sites and Yelp & Google Places don’t track them. I would sit on Yelp and hunt through listings, juggling dollar signs and phone numbers, calling annoyed bartenders and reading reviews, but I dreamed of another option.

“Happy Hour” is a Command Line Interface application that allows users to track down Happy…


On paper, my life rocked—I got paid to do what I loved and there were pictures and video to prove it.

I once held Tommy Lee’s face in my hands while I sang “Kickstart My Heart” at the Whiskey-A-Go-Go in LA. My first gig with the USO was singing the National Anthem at a pro football game. I toured Europe singing on cruise ships. Performances on aircraft carriers. New Year’s Rockin’ Eve in Time Square. Rock clubs and dive bars. Galas, weddings, festivals, you name it. I was there in some wild costume, running around like a psycho or side…

Zoe Friedman

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store