In a Ruby on Rails application, it’s not uncommon to encounter code which reaches deep into the internals and database schema of a model. class Person < ActiveRecord::Base enum gender: { male: 1, female: 2 } end class PeopleController < ApplicationController def index @people = Person.where(gender: Person.genders[:male]) .where('age >= 18') .where(right_handed: false) respond_to(:html) end end Thi